Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
After activating cck_map for one of my content types, I got this error "While traversing node variables your recursion limit of 10 was hit 3 times" while trying to create the content template.
Could you please let me know what caused it? Thanks.
Comment | File | Size | Author |
---|---|---|---|
#32 | contemplate_depth.patch | 804 bytes | brad.bulger |
Comments
Comment #1
timothymedia CreditAttribution: timothymedia commentedI had the same problem when creating a content template with Contemplate. I have no cck_map, only regular CCK_fields. No solution found yet.
Comment #2
fallsemo CreditAttribution: fallsemo commentedtimothymedia - same here. Any solution to this?
Comment #3
ressa CreditAttribution: ressa commentedI get almost the same error when I try to access a content type built with cck:
"While traversing node variables your recursion limit of 10 was hit 15 times"
Comment #4
rbryer CreditAttribution: rbryer commentedI also get the same error message, and the template does not appear to have all the node fields I would expect in it.
Comment #5
chrism2671 CreditAttribution: chrism2671 commentedI have the same problem too. Has anybody made any progress on fixing it?
Comment #6
epicflux CreditAttribution: epicflux commentedCheckout this page on your site: admin/settings/contemplate
Comment #7
rbryer CreditAttribution: rbryer commentedRe #6. I set my recursion limit first to 15 then 20 then 25 and then 30 .... each time I get the same error, maybe will a few less hits. There is talk about this error on the contemplate issue list #230885: CCK activates triggers Fatal error and it seems that this limit has been added to prevent a fatal out of memory failure.
As far as I can tell this limit just stops the module from completely blowing the memory limits, but it still fails. There must be something else wrong with the code if it is causing such a deep recursion and this does not seem to be a solution, more a band-aid. I can't even figure out what my response to this error should be. Does it mean that the template code produced is incorrect? It just warns me and then lets me continue so I have no idea what the final result will be.
This issue also seems to be a duplicate of #268598: While traversing node variables your recursion limit of 10 was hit 15 times but there does not seem to be any satisfactory solutions on any post. I have had to remove the module.
This issue should be moved over to the contemplate issue list as I don't think it has anything directly to do with the cck_map module.
Comment #8
epicflux CreditAttribution: epicflux commentedTry setting the recursion limit really high, which will be a relative setting for each site, I set mine to 50, but I would set it to 1000 (and I just did) as long as I didn't get the white screen of death...
I think this setting was originally created to address an issue in Drupal 6 Contemplate, and was moved to the Drupal 5 version since it could help there too...
Comment #9
dugh CreditAttribution: dugh commentedI see the same issue trying to use contemplate.
I'm not using cck_map at all.
Comment #10
jrglasgow CreditAttribution: jrglasgow commentedepicflux is right in comment #8 - I added the recursion limit to fix #230885: CCK activates triggers Fatal error. This bug started occurring in D6. When traversing the $node object the php memory limit was hit. I don't know what causes it. This error will only appear on the contemplate edit page, no where else.
Comment #11
rbryer CreditAttribution: rbryer commentedI'm still unclear what this message actually means. Does it mean that the generate contemplate is invalid?
Comment #12
jrglasgow CreditAttribution: jrglasgow commentedAll this error means is that when Content Templates modules attempts to show you all the parts of the $node variable(in the box below the template) it is using recursion to show you parts of the $node. When the $node is excessively large traversing the $node uses a huge amount of memory (especially since we do it 3 times). We have a user defined setting to set the recursion limit. This error tells you that the recursion limit was hit. This error doesn't mean there is anything wrong with the node or the template, it is just telling you that you may not have all the possible options shown for the $node variable in the variables box. There is no problem that will occur when the nodes are displayed using the template, or when editing the template.
I added this recursion depth limit to prevent White Screen of Death when the PHP Memory Limit is hit which is a FATAL error. I could have limited the recursion depth silently, but I wanted to let the user know that he/she may be missing some parts of the $node variable.
Comment #13
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedI went back to the last rev of contemplate and eh problem is gone 5.x.1.9.
Chris
Comment #14
jrglasgow CreditAttribution: jrglasgow commentedI will change this from an error to a notice.
Comment #15
Dries ArnoldsWhy is this a minor issue when some template variables aren't visible? It doesn't stop completed content templates from functioning, but it can make it really hard to make new ones.
Comment #16
jrglasgow CreditAttribution: jrglasgow commentedThis notice informs you when you aren't seeing the whole variable, it gives you the opportunity to change the recursion deph limit to see more of the variable. On the 2 or 3 times the limit is hit it is because the $node variable has a recursion problem and the variable information that is left out is in the $node variable somewhere else where it is already displayed.
I have fixed the code so this does not appear as an error, but as a notice. The changes will appear in the next releases og Content Templates for D5 and D6.
Comment #17
trevorleenc CreditAttribution: trevorleenc commentedok, is it just me, or am I missing something...
I am on d5.8, and just upgraded to contemplate 2.02, and I don't have a "admin/settings/contemplate"
Comment #18
trevorleenc CreditAttribution: trevorleenc commenteddisregard last comment...I just emptied my cache* tables...and all was right with the world..
Comment #19
dugh CreditAttribution: dugh commentedWhen do you plan to release this, it pretty much makes contemplate unusable. Also, how can you increase the recursion limit.
Comment #20
Jehf CreditAttribution: Jehf commentedjrglasgow-
I'm seeing this, too.
Previous experience (not in Drupal, where I'm an utter newbie, so this may be ign'rnt) makes me wonder whether the node hierarchy is looping back on itself which, if you're not watching for it, could cause you to run out of memory no matter how high you set the limit.
For instance, I'm using the Node Reference and Node Auto Term (NAT) modules, both of which probably create some very complicated object trees.
Just guessing...
Comment #21
AD-DA CreditAttribution: AD-DA commentedMay I suggest a more informative error message?
"While traversing node variables your recursion limit of XX was hit YY times. This means that you may not see all available variables in the "Body Variables" sections below, however it will not affect the display of nodes with the templates defined here. You may increase the recursion limit in the admin/settings/contemplate Contemplate Settings page."
Comment #22
Terebinth CreditAttribution: Terebinth commentedSaw this annoying error too and thought '''what now....''
Totally agree with Andjety ..... a more informative error message would have saved me some anxiety and time in trying to figure out what 'went wrong'.....
Comment #23
Phillip Mc CreditAttribution: Phillip Mc commentedhaving the same problem.
anyone know what recursion limit is too high?
Or is there a benchmark for the amount of memory you should have availabile for, let's say, a limit of 20?
Comment #24
rbryer CreditAttribution: rbryer commentedIn my experience you can keep setting it higher and it will just take longer to reach the new limit, and then throw the error anyway. I can set it to 200 and it will still hit it. There is a more fundamental issue here with the data structure of some of the node details. I use og_groups and it appears to contain data structures that reference other elements at the same or a higher level. This causes the recursion to loop until it hits the limit and then fails anyway.
Its hard to say what is at fault here.
Comment #25
Phillip Mc CreditAttribution: Phillip Mc commentedAs a suggestion, would it be an idea to add a checkbox to the contemplate.module settings page for "basic", and "indepth" recursion?
In other words, a basic recursion would just load up a list of the basic node and cck variables, rather than the kitchen sink approach, where the module tries to recurse through everything and then some.
For advanced, it would go a level deeper, where it would display example variable strings, like it does now by default. 9 times out of 10 I will know which variable names I need to use just by looking at a list and if I'm stuck, I can switch to the "indepth" mode.
The point is that I and I imagine most others probably mostly use the contemplate.module for moving node and cck variables around in the teaser/main body, so the 'indepth' recursion that contemplate presents at the moment, maybe a bit of an overkill and just being presented with a list of the variables availabile to your node is enough. The current way it works is useful, but, if that's where the recursion limit issue is coming from, it maybe something you just use now and again, when you're stuck, or if you are having difficulty identifying a particular variable.
Any thoughts?
It's a great module and while it is a relatively minor error, it would be great to see it sorted.
Comment #26
eric.chenchao CreditAttribution: eric.chenchao commentedI just add a imagefield (in drupal 6 with CCK2.0-rc5) and recursion limit of 10 was hit 80 times
So I closed to $node->content in admin/settings/contemplate page
Comment #27
Oliver Huynh CreditAttribution: Oliver Huynh commentedAgree with u, Philk!
Comment #28
grah CreditAttribution: grah commented+1 for Philk's suggestion.
Comment #29
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #30
drupaloo-1 CreditAttribution: drupaloo-1 commentedI got the same error:
While traversing node variables your recursion limit of 10 was hit 117 times. For more information about this error goto http://drupal.org/node/230885. This error will not effect the operation of Content Template, but it may not show you all available variables on this page. This error will only appear on this page.
I ain't no high falutin PHP programmer and having read all the above posts, I get the impression there is no definite fix for this, only to set the limit higher, but it has not been defined what the new limit should be, and if it still gets exceeded, what the cause is, and what the resulting problems are, such as possible data loss.
If I misunderstand this, please excuse me. If this is correct, please fix it, or at least provide an explanation.
BTW the path admin/settings/contemplate can also be reached at Home :: Administer :: Site configuration > Content Template Settings
Comment #31
drupaloo-1 CreditAttribution: drupaloo-1 commentedI set the limit to 20 and got:
While traversing node variables your recursion limit of 20 was hit 2151 times. For more information about this error goto http://drupal.org/node/230885. This error will not effect the operation of Content Template, but it may not show you all available variables on this page. This error will only appear on this page.
Again, I am not sure what this implies, but Drupal got real unresponsive, and so I dont feel comfortable using Contemplate.
Comment #32
brad.bulger CreditAttribution: brad.bulger commentedThere seems to me to be a simple error in the code that is causing spurious complaints about hitting the recursion limit.
in the contemplate_array_variables() function, when going through the values, when it makes another call to contemplate_array_variables() (thus going one level deeper), it is *incrementing* the $depth variable as part of the function call. so the depth of the first array value at a given level will be 3, say, and then for the next value of that same array, at the same level, the depth will be 4.
it should be only adding 1 to the value of $depth in the function call, not changing it (which is what incrementing it will do).
i have patched this and the error goes away, without ever encountering any kind of memory problems.
am i seriously misunderstanding something?
Comment #33
jrglasgow CreditAttribution: jrglasgow commentedI have committed this to D6 and D5, and released a new version. Hoping this finally takes care of this problem the new release is 6.x-1.0
Comment #34
drupaloo-1 CreditAttribution: drupaloo-1 commentedI thought I would revisit the module and I do not experience the problem with 6.x-1.0.
Thank you very much for resolving this!
Comment #35
nirad CreditAttribution: nirad commentedsubscribing.
getting this error with Contemplate 6.x-1.1 and CCK 6.x-2.3
Comment #37
SocialNicheGuru CreditAttribution: SocialNicheGuru commented(deleted comment)