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)

CommentFileSizeAuthor
insert_view-recursion-prevention.diff1.43 KBAlan D.
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Alan D.’s picture

I forgot to add an & in front of the drupal_static() call :)