Forums / Developer / template overrides not working for translations

template overrides not working for translations

Author Message

Cristina Carvalho

Thursday 28 April 2011 3:11:27 pm

Hello,

I'm a developer working on a ez publish website previously created by another developer. I'm relatively new to EZ Publish but I found my way around overriding templates, creating new classes, translating content.

However, the new template overrides seem to only work in the default site language. When I click the English or Spanish version it does not fetch the same template overrides and uses the old overrides instead.

How can I fix this? :( Thank you in advance for your help..!

Greg McAvoy-Jensen

Friday 29 April 2011 12:01:30 am

Cristina,

Are the override rules for the new templates in the siteaccess for the default site language? Be sure they are accessible for the English and Spanish siteaccesses as well. And of course clear the cache.

Granite Horizon, Certified Developer of eZ Publish Web Solutions
Provider of the SaaS Solution Granite Horizon In The Cloud | http://granitehorizon.com/cloud
http://granitehorizon.com | +1 916 647 6350 | California USA | @granitegreg
Blog: http://granitehorizon.com/blog

Cristina Carvalho

Saturday 30 April 2011 4:36:34 am

"

Christina,

Are the override rules for the new templates in the siteaccess for the default site language? Be sure they are accessible for the English and Spanish siteaccesses as well. And of course clear the cache.

"

Oh, I didn't know there were siteaccess rules for each language, I shall look for those files then.

I've heard a lot about clearing cache, which is the best way? Should I just delete those files that end with a "~" ?

I apologize in advance if my questions are so basic, but I wasn't the developer behind the system and there were many concepts I only grasped at a glimpse...

Thank you in advance for your kind response!

Greg McAvoy-Jensen

Saturday 30 April 2011 8:29:29 am

Cristina,

You can clear the cache by:

  • In the admin interface, when logged in as admin, clicking setup and then clear all (or use the shortcut from the right column)
  • From the command line in the root eZ Publish director, running $php bin/php/ezcache.php --clear-all --purge
  • If for some reason those don't work, delete the content of var/cache and var/SITEACCESS_VAR_DIR/cache

In practice, using the first option should take care of it. Note that if you're in a production environment on a server that's getting hit hard, clearing all caches is risky, because the work of generating all caches at once may be too much for the server. In this case clear caches of only the page you need (in admin, navigate to the object and click the icon next to its name; then delete view cache). or the type you need (ini cache, template block cache, etc.

Granite Horizon, Certified Developer of eZ Publish Web Solutions
Provider of the SaaS Solution Granite Horizon In The Cloud | http://granitehorizon.com/cloud
http://granitehorizon.com | +1 916 647 6350 | California USA | @granitegreg
Blog: http://granitehorizon.com/blog

Cristina Carvalho

Sunday 01 May 2011 3:46:58 am

Thank you very much Greg! You were a great help! :)

eZ debug

Timing: Jan 17 2025 23:47:43
Script start
Timing: Jan 17 2025 23:47:43
Module start 'content'
Timing: Jan 17 2025 23:47:44
Module end 'content'
Timing: Jan 17 2025 23:47:44
Script end

Main resources:

Total runtime0.7666 sec
Peak memory usage4,096.0000 KB
Database Queries200

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0054 588.9609180.8203
Module start 'content' 0.00540.6548 769.7813576.7734
Module end 'content' 0.66020.1063 1,346.5547341.3672
Script end 0.7665  1,687.9219 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00410.5375210.0002
Check MTime0.00150.1955210.0001
Mysql Total
Database connection0.00050.069810.0005
Mysqli_queries0.690490.05222000.0035
Looping result0.00180.23711980.0000
Template Total0.743697.020.3718
Template load0.00230.301120.0012
Template processing0.741396.694620.3706
Template load and register function0.00010.015110.0001
states
state_id_array0.00040.046410.0004
state_identifier_array0.00160.209020.0008
Override
Cache load0.00200.2605330.0001
Sytem overhead
Fetch class attribute can translate value0.00280.368630.0009
Fetch class attribute name0.00100.129970.0001
XML
Image XML parsing0.00150.193730.0005
class_abstraction
Instantiating content class attribute0.00000.0030100.0000
General
dbfile0.00240.3069350.0001
String conversion0.00000.000530.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
5content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
7content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/quote.tpldatatype/ezxmltext/quote.tplextension/ezwebin/design/ezwebin/override/templates/datatype/ezxmltext/quote.tplEdit templateOverride template
1content/datatype/view/ezxmltags/li.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/li.tplEdit templateOverride template
1content/datatype/view/ezxmltags/ul.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/ul.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 22
 Number of unique templates used: 8

Time used to render debug report: 0.0002 secs