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
When a descendant element is set to a categories field, or an entries field set to maintain hierarchy, the element's ancestors can't be expanded or collapsed in the element select modal. This creates a problem if the ancestor is stuck as collapsed (which can happen if it was collapsed when the field was used in a different context where the ancestor was collapsible), since no other descendants can then be selected for the field.
Steps to reproduce
Fresh Craft install
Create a new new category group, or structure section, with no level limit
In the above group/section, create one level 1 element (named L1) with two child elements (named L2A and L2B)
Create a categories or entries field with the above group/section as its only source, set to maintain hierarchy, no limit on selectable branches
Create a channel section (and entry type on Craft 5), and add the above field to the entry type field layout
Create an entry in the channel, add element L2A to the above field
Try to add another element to the field, and note that element L1 cannot be collapsed
Create another entry in the channel, click to add an element to the field, collapse element L1 and exit
Go back to the first entry in the channel, click to add an element to the field, and note that element L1 cannot be expanded, making it impossible to select element L2B
Expected behavior
Category/entry could be expanded/collapsed regardless of any descendant elements being selected for the field already
Actual behavior
Category/entry can't be expanded/collapsed
Craft CMS version
4.10.5 / 5.2.6
PHP version
No response
Operating system and version
No response
Database type and version
No response
Image driver and version
No response
Installed plugins and versions
None
The text was updated successfully, but these errors were encountered:
What happened?
Description
When a descendant element is set to a categories field, or an entries field set to maintain hierarchy, the element's ancestors can't be expanded or collapsed in the element select modal. This creates a problem if the ancestor is stuck as collapsed (which can happen if it was collapsed when the field was used in a different context where the ancestor was collapsible), since no other descendants can then be selected for the field.
Steps to reproduce
Expected behavior
Category/entry could be expanded/collapsed regardless of any descendant elements being selected for the field already
Actual behavior
Category/entry can't be expanded/collapsed
Craft CMS version
4.10.5 / 5.2.6
PHP version
No response
Operating system and version
No response
Database type and version
No response
Image driver and version
No response
Installed plugins and versions
None
The text was updated successfully, but these errors were encountered: