Dissapearing Menu

Author Message

Richard Tuin

Tuesday 04 July 2006 3:34:15 am

While developing and filling a website i'm working on, there appears to be some strange cache behaviour.

The menu of the website is on the left (the template is a slightly modification of the standard left_menu.tpl).
It renders well all the time, except when something has changed in the subtreenode of the node you're viewing.
Then the menu doesn't show up at all.

I tried various solutions like creating a cache block with the key on $node.node_id, and not using cache blocks.

Somewhere else on the forum i read that $node is not usable in a cached pagelayout.tpl.

Is anyone familiar with this problem, or can think of any solutions?

Any think along is also greatly appreciated.

Nathan Kelly

Wednesday 05 July 2006 12:24:54 am

Hi Richard,

I had a similar problem with this today, I was using $node.whatever in an override pagelayout i.e. home_pagelayout.tpl

I was trying to out put the description from the main node on the home page with:

{$node.object.data_map.description.content.output.output_text}

This worked fine untill the page was cached.

I changed my home_pagelayout.tpl to instead include:

{include uri="design:page_mainarea.tpl"}

Then I created an override template for page_mainarea.tpl, my override template now contains my $node.whatever and everything works fine now.

[home_mainarea]
Source=node/view/full.tpl
MatchFile=full/home_page.tpl
Subdir=templates
Match[node]=2

So I'd suggest you don't use the $node variable in the pagelayout if you want to use the cache.

I hope this solves your problem.

Cheers!

Pardon me while I burst into flames...

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 19:16:46
Script start
Timing: Jan 18 2025 19:16:46
Module start 'layout'
Timing: Jan 18 2025 19:16:46
Module start 'content'
Timing: Jan 18 2025 19:16:47
Module end 'content'
Timing: Jan 18 2025 19:16:47
Script end

Main resources:

Total runtime0.8087 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0075 589.2188152.6094
Module start 'layout' 0.00750.0037 741.828139.4141
Module start 'content' 0.01110.7961 781.2422533.4844
Module end 'content' 0.80720.0014 1,314.72668.1875
Script end 0.8086  1,322.9141 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.4227160.0002
Check MTime0.00130.1656160.0001
Mysql Total
Database connection0.00090.117110.0009
Mysqli_queries0.755293.3863540.0140
Looping result0.00060.0716520.0000
Template Total0.773095.620.3865
Template load0.00170.211920.0009
Template processing0.771395.373720.3856
Template load and register function0.00010.017110.0001
states
state_id_array0.00190.235910.0019
state_identifier_array0.00130.162620.0007
Override
Cache load0.00140.1770260.0001
Sytem overhead
Fetch class attribute can translate value0.00070.086120.0003
Fetch class attribute name0.00120.151240.0003
XML
Image XML parsing0.00100.123920.0005
class_abstraction
Instantiating content class attribute0.00000.001040.0000
General
dbfile0.00080.1044220.0000
String conversion0.00000.001440.0000
Note: percentages do not add up to 100% because some accumulators overlap

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
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
3content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 16
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs