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.