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! :)

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 02:04:14
Script start
Timing: Jan 18 2025 02:04:14
Module start 'layout'
Timing: Jan 18 2025 02:04:14
Module start 'content'
Timing: Jan 18 2025 02:04:15
Module end 'content'
Timing: Jan 18 2025 02:04:15
Script end

Main resources:

Total runtime0.0185 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0057 589.1797152.6406
Module start 'layout' 0.00570.0035 741.820339.4844
Module start 'content' 0.00920.0070 781.304797.5859
Module end 'content' 0.01630.0022 878.890638.2891
Script end 0.0185  917.1797 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002915.4550140.0002
Check MTime0.00136.8968140.0001
Mysql Total
Database connection0.00063.289310.0006
Mysqli_queries0.003317.849230.0011
Looping result0.00000.091410.0000
Template Total0.00189.510.0018
Template load0.00105.375710.0010
Template processing0.00084.116210.0008
Override
Cache load0.00073.852110.0007
General
dbfile0.00168.379280.0002
String conversion0.00000.054140.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_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