Forums / Localized forums / Japanese / URL Alias Filter機能 not work

URL Alias Filter機能 not work

|
|
Next topic
 »
Author Message

Kaz Mit

Wednesday 04 May 2011 6:43:01 am

This problem has been already posted within forum/multilingual-japanese-url-alias topic. We are able to share good solution, but I can't get it to work. It looks like the process function never seems to get called. I can't explain the details about my problem in English, so that sorry in Japanese as below.

0. 問題

URL Alias Filter機能により、例えば”node_175”を”test”に置き換えることを試しましたが、下記1.の設定では、感触としましてFilterが全く呼び出されない様です。PHPもしくはeZ Publishの設定漏れや誤設定が原因と思っておりますが、PHPとeZ Publishの経験が浅く、デバッグに難儀しており、問題の解決に至ることができません。設定誤りや設定不足のご指摘、あるいはfilterのdebug方法につきアドバイスをお願いできれば幸いです。

1. 設定

1.1 extensionにmyfiltersを追加

extension/myfilters/settings

extension/myfilters/urlfilters

1.2 site.iniに下記を追加

extension/myfilters/settings/site.ini.append.php

[URLTranslator]

Extensions[]

Extensions[]=myfilters

Filters[]

Filters[]=StripWords

1.3 StripWords Classの作成、override methodの実装

extension/myfilters/urlfilters/stripwords.php

<?php

class StripWords extends eZURLAliasFilter

{

function process( $text, $languageObject, $caller)

 {

  return str_replace( “node_175”, “test”, $text);

}

}

?>

1.4 エクステンションの追加

myfiltersを利用可能なエクステンションに追加

1.5 管理画面にてsite.ini設定表示

[URLTranslator]

Translation

  default enabled

TranslatableSystemUrls

  default enabled

WordSeparator

  default “dash”

TransformationGroup

  default “urlalias”

WildcardTranslation

  default enabled

MaximumWildcardIterations

  default 20

NodeTranslation

  default enabled

Filters

  default [0]

  extension:myfilters [1] StripWords

FilterClasses

  default [0]

  default [1] eZURLAliasFilterAppendNodeID

Extensions

  extension:myfilters [0]

  extension:myfilters [1] myfilters

1.6 php.ini設定表示(filterのみ)

Input Validation and Filtering   enabled

Revision   298196

filter.default   unsafe_raw

filter.default_flags   no value

1.7 autoload確認(var/autoload/ezp_extension.php)

'StripWords'   extension/myfilters/urlfilters/stripwords.php

1.8 動作環境

Linux (kernel 2.6.34.8), Apache2(2.2.15), PHP(5.3.3), MySQL(5.1.46)

2. 試行とその結果

1) TransformationGroup の設定を変えても同一結果

   urlalias / urlalias_iri

2) eZ PublishのProjectを変えても同一結果

eZ Publish 4.2

eZ Publish Community Project 4.4

eZ Publish Community Project 4.5 BETA

3) log出力設定を変えても、期待の結果がvar/logに出力されません

site.ini[DebugSettings]セクション

DebugOutput enabled

AlwaysLog [0]

[1] notice

3. 下記URLを参照させていただきました

URL Alias Filterにつき

http://doc.ez.no/eZ-Publish/Technical-manual/4.5/Features/Multi-language-support-for-URL-aliases/URL-transformation-rules

デバッグ方法につき

https://groups.google.com/group/ez-publish-japan/browse_thread/thread/bfefdaadb731547b?hl=ja

以上

eZ debug

Timing: Jan 17 2025 22:59:33
Script start
Timing: Jan 17 2025 22:59:33
Module start 'content'
Timing: Jan 17 2025 22:59:33
Module end 'content'
Timing: Jan 17 2025 22:59:33
Script end

Main resources:

Total runtime0.2734 sec
Peak memory usage4,096.0000 KB
Database Queries183

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0076 587.8672180.7734
Module start 'content' 0.00760.1174 768.6406422.5469
Module end 'content' 0.12500.1484 1,191.1875335.1250
Script end 0.2734  1,526.3125 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00401.4788210.0002
Check MTime0.00150.5614210.0001
Mysql Total
Database connection0.00090.319710.0009
Mysqli_queries0.196371.77721830.0011
Looping result0.00170.62851800.0000
Template Total0.240387.920.1202
Template load0.00230.828720.0011
Template processing0.238187.066820.1190
Template load and register function0.00020.088510.0002
states
state_id_array0.00100.367610.0010
state_identifier_array0.00080.280220.0004
Override
Cache load0.00200.7353840.0000
Sytem overhead
Fetch class attribute can translate value0.00200.741720.0010
Fetch class attribute name0.00110.391010.0011
XML
Image XML parsing0.00060.218320.0003
class_abstraction
Instantiating content class attribute0.00000.001510.0000
General
dbfile0.00481.7702210.0002
String conversion0.00000.002130.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
1content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
3content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/link.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/link.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 8
 Number of unique templates used: 5

Time used to render debug report: 0.0002 secs