Persistent vars: nesting lev. too deep - recursive depend..?

Author Message

Piotrek Karaś

Monday 19 May 2008 11:08:55 am

Sometimes, when I pass persistent variables:

{set scope='global' persistent_variable=hash(
    'node_can_edit', $node.can_edit,
    'node_can_create', $node.can_create,
    'node_main_node_id', $node.main_node_id,
    'node_object_current_language', $node.object.current_language, 
    'current_node', $node,
)}

...eZ Publish encounters:

...persistent_variable' => array (
Fatal error: Nesting level too deep - recursive dependency? in /var/www/architektura/kernel/classes/clusterfilehandlers/ezfsfilehandler.php on line 514
Fatal error: eZ Publish did not finish its request

The execution of eZ Publish was abruptly ended, the debug output is present below.

Any idea why exactly? I mean this seems to be caused by the last variable (current_node), but it works fine in most cases...

Thanks,
Piotrek

--
Company: mediaSELF Sp. z o.o., http://www.mediaself.pl
eZ references: http://ez.no/partners/worldwide_partners/mediaself
eZ certified developer: http://ez.no/certification/verify/272585
eZ blog: http://ez.ryba.eu

André R.

Monday 19 May 2008 1:37:26 pm

Persistent variable is serialized together with view cache, complex objects like nodes are not serializable. You would have gotten the same problem if you tried to store the object in some shm cache. Pass the id instead or something.

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

Piotrek Karaś

Monday 19 May 2008 8:35:11 pm

Too bad. When 64 out of 65 times it worked, I thought I could successfully pass that just as a reference ;) Actually, it's lucky that it failed this one time ;)

Thanks!

--
Company: mediaSELF Sp. z o.o., http://www.mediaself.pl
eZ references: http://ez.no/partners/worldwide_partners/mediaself
eZ certified developer: http://ez.no/certification/verify/272585
eZ blog: http://ez.ryba.eu

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 19 2025 04:32:39
Script start
Timing: Jan 19 2025 04:32:39
Module start 'layout'
Timing: Jan 19 2025 04:32:39
Module start 'content'
Timing: Jan 19 2025 04:32:39
Module end 'content'
Timing: Jan 19 2025 04:32:39
Script end

Main resources:

Total runtime0.0192 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.0071 589.3984152.6563
Module start 'layout' 0.00710.0038 742.054739.4922
Module start 'content' 0.01090.0059 781.546993.5078
Module end 'content' 0.01680.0024 875.054734.3047
Script end 0.0191  909.3594 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.003417.6607140.0002
Check MTime0.00179.1180140.0001
Mysql Total
Database connection0.00084.231510.0008
Mysqli_queries0.003116.184330.0010
Looping result0.00000.109410.0000
Template Total0.002010.610.0020
Template load0.00136.577910.0013
Template processing0.00083.956910.0008
Override
Cache load0.00105.081610.0010
General
dbfile0.00031.548580.0000
String conversion0.00000.057240.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