You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can create an infinite recursion if you pick the parent item itself in a Content Picker Field.
To Reproduce
Steps to reproduce the behavior:
Add Content Picker Field to a content type, allowing the content type itself to be selected (e.g. you add it to Page, and let Page items be picked too).
Create a content item, publish, edit again, pick the content item itself, publish.
By default, this doesn't cause an issue, because the ContentPicker shape only lists the display texts of the picked items. However, if you have an override that DisplayAsync()s the picked items, see below, you can produce an infinite loop, crashing the process.
This is clearly a misconfiguration that can't produce much sensible, but still, the app shouldn't crash. So, e.g.:
An error message is displayed on the frontend in place of the picked items.
Don't let such picked items be saved in the first place. This might be just part of the solution though, since due to indirections (picked item within picked item...) and dynamic inclusions this can't necessarily be determined.
Screenshots
The text was updated successfully, but these errors were encountered:
In Fluid there is MaxSteps and MaxRecursion to limit the execution of templates.
Piedone
changed the title
Infinite loop when Content Picker Field references its own parent item with displaying shape override
Infinite recursion when Content Picker Field references its own parent item with displaying shape override
Jun 6, 2024
We triaged this issue and set the milestone according to the priority we think is appropriate (see the docs on how we triage and prioritize issues).
This indicates when the core team may start working on it. However, if you'd like to contribute, we'd warmly welcome you to do that anytime. See our guide on contributions here.
Describe the bug
You can create an infinite recursion if you pick the parent item itself in a Content Picker Field.
To Reproduce
Steps to reproduce the behavior:
ContentPicker
shape only lists the display texts of the picked items. However, if you have an override thatDisplayAsync()
s the picked items, see below, you can produce an infinite loop, crashing the process.Latest
main
(8e3c818).Expected behavior
This is clearly a misconfiguration that can't produce much sensible, but still, the app shouldn't crash. So, e.g.:
Screenshots
The text was updated successfully, but these errors were encountered: