It is easy to create a view that displays nodes that have the same embedded tag. This leads to a recursive loop that eventually leads to a fatal error when the recursion stack hits it's limit or the memory limit is exhausted.
While it almost always means an instant crash, and thus an obvious issue, no big deal, the user corrects the view and continues on. However, the filter or sort conditions are not always seen during development and these are only triggered at a latter date.
Since this is a 501 level error, I have marked this issue as a critical.
IE: The approx. error workflow:
Show teasers [view:teasers] sorted by modified descending
Embed the tag in a teaser of a node
Save
Internal server error 501
(and developer fixes error to add a teaser break / fix view to exclude etc)
Show teasers [view:teasers] sorted by recent comments descending
Embed the tag in a teaser of a node
Save
Site deployed
(months pass)
User adds comment to node with embedded tag
Internal server error 501
(and the site's owner panics)
| Comment | File | Size | Author |
|---|---|---|---|
| insert_view-recursion-prevention.diff | 1.43 KB | alan d. |
Comments
Comment #1
alan d. commentedI forgot to add an & in front of the drupal_static() call :)
Comment #2
igor mashevskyi commentedD7 reached its EOL back in January 2025, and there is no active release for D7 for this module anymore.
Development or support is not planned for D7. All D7-related issues are marked as outdated in a bunch.
Everyone can apply the patch above (not tested by the maintainers, tested by the community) to their D7 projects.
If the issue remains relevant for D10+ versions, merge requests with proposed solutions for a new module version (D10+) are welcome in a new follow-up issue.
Thanks!