I'd like to understand the rationale behind the stack overflow guard in actions_do(). Today (D6), if I understand correctly, the code aborts when it encounters more than 35 (or the value of actions_max_stack) invocations of actions_do() during one page rendering, *even if those invocations are sequential, not recursive*. I don't think that this is what's intended. Instead, I would have expected the code to abort if there are more than 35 recursive invocations of actions_do(), which would be achieved by just adding
$stack--;
just before the return of actions_do();
I am bringing this up because my module Views Bulk Operations allows one to select an arbitrary number of nodes and to apply a specific action on each of them. The code only works currently if I set actions_max_stack to a large number, which strikes me as inelegant and illogical.
Comment | File | Size | Author |
---|---|---|---|
#6 | stackfixjv_d6_0.patch | 754 bytes | ainigma32 |
#1 | stackfixjv.patch | 795 bytes | jvandyk |
Comments
Comment #1
jvandyk CreditAttribution: jvandyk commentedI agree with kratib. It is only the number of recursive calls we are concerned with.
Comment #2
moshe weitzman CreditAttribution: moshe weitzman commentedtrivial fix.
Comment #3
Dries CreditAttribution: Dries commentedCommitted to CVS HEAD. Thanks.
Comment #4
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #5
Dave ReidRe-opening for 6.x. Marking #338031: Actions recursion limits not implemented properly as a duplicate of this issue.
Comment #6
ainigma32 CreditAttribution: ainigma32 commentedRerolled for D6.
- Arie
Comment #7
Damien Tournoud CreditAttribution: Damien Tournoud commentedAlready in HEAD.
Comment #8
Jose Reyero CreditAttribution: Jose Reyero commentedI think this should get into D6 core ASAP. It is a serious bug that makes actions and triggers completely unreliable.
Comment #9
Gábor HojtsyCommitted to Drupal 6, thanks!