Global vabiable lost

Author Message

Lisa Pini

Monday 29 September 2008 1:47:16 am

Hi,
I have a problem with global variable.
In my pagelayout I set:
{def $pinocchio=$module_result}
{set scope='global' $pinocchio=$module_result}

At the end of my pagelayout I try to write the value:
{$module_result.path.2.node_id}
and
{$#pinocchio.path.2.node_id}

I have clear all cache.
I browse my site and both variables were visible at the end of my site, but sometime the value of variable pinocchio is lost. I can lost the value olso only with 3-4 F5 in the same page. By this moment pinocchio is always lost, in all the site pages.
When I lost the value, I have to clean cache to reset it.

Can someone tell me what appened?

Thanks

Lisa

André R.

Monday 29 September 2008 3:21:16 am

I'll guess that the first code block is inside a cache-block and the next part is not inside the same cache-block, correct?

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Lisa Pini

Monday 29 September 2008 4:00:20 am

You are right!
I'll try to put the variable setting outside the cache block.

Thanks

Lisa

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 31 2025 01:26:29
Script start
Timing: Jan 31 2025 01:26:29
Module start 'layout'
Timing: Jan 31 2025 01:26:29
Module start 'content'
Timing: Jan 31 2025 01:26:29
Module end 'content'
Timing: Jan 31 2025 01:26:29
Script end

Main resources:

Total runtime0.0213 sec
Peak memory usage6,144.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0048 588.1250151.2109
Module start 'layout' 0.00480.0031 739.3359220.6875
Module start 'content' 0.00780.0119 960.0234997.7734
Module end 'content' 0.01980.0015 1,957.796933.9922
Script end 0.0212  1,991.7891 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002511.6890140.0002
Check MTime0.00115.3029140.0001
Mysql Total
Database connection0.00073.326910.0007
Mysqli_queries0.00188.630930.0006
Looping result0.00000.042610.0000
Template Total0.00104.910.0010
Template load0.00083.828710.0008
Template processing0.00021.014910.0002
Override
Cache load0.00062.747810.0006
General
dbfile0.00083.862480.0001
String conversion0.00000.032540.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