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.

CommentFileSizeAuthor
#6 stackfixjv_d6_0.patch754 bytesainigma32
#1 stackfixjv.patch795 bytesjvandyk
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jvandyk’s picture

Version: 6.x-dev » 7.x-dev
Assigned: Unassigned » jvandyk
Status: Active » Needs review
FileSize
795 bytes

I agree with kratib. It is only the number of recursive calls we are concerned with.

moshe weitzman’s picture

Status: Needs review » Reviewed & tested by the community

trivial fix.

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

Dave Reid’s picture

Version: 7.x-dev » 6.x-dev
Status: Closed (fixed) » Patch (to be ported)

Re-opening for 6.x. Marking #338031: Actions recursion limits not implemented properly as a duplicate of this issue.

ainigma32’s picture

Status: Patch (to be ported) » Needs review
FileSize
754 bytes

Rerolled for D6.

- Arie

Damien Tournoud’s picture

Category: support » bug
Status: Needs review » Reviewed & tested by the community

Already in HEAD.

Jose Reyero’s picture

I think this should get into D6 core ASAP. It is a serious bug that makes actions and triggers completely unreliable.

Gábor Hojtsy’s picture

Status: Reviewed & tested by the community » Fixed

Committed to Drupal 6, thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.