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 27 2025 18:00:47
Script start
Timing: Jan 27 2025 18:00:47
Module start 'content'
Timing: Jan 27 2025 18:00:47
Module end 'content'
Timing: Jan 27 2025 18:00:47
Script end

Main resources:

Total runtime0.1114 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0061 589.1953180.8203
Module start 'content' 0.00610.0051 770.015698.1484
Module end 'content' 0.01110.1002 868.1641530.2344
Script end 0.1114  1,398.3984 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00292.6285200.0001
Check MTime0.00121.0826200.0001
Mysql Total
Database connection0.00070.671310.0007
Mysqli_queries0.072865.36971410.0005
Looping result0.00080.75711390.0000
Template Total0.099989.710.0999
Template load0.00070.599610.0007
Template processing0.099289.065110.0992
Override
Cache load0.00050.423710.0005
Sytem overhead
Fetch class attribute can translate value0.00040.338310.0004
XML
Image XML parsing0.00020.170610.0002
General
dbfile0.00766.8144200.0004
String conversion0.00000.003630.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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs