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
If a field has a condition rule "Has a value" dependent on a Matrix field using the Cards view mode, adding or deleting nested entries in that Matrix field does not automatically update the field layout. I.e. the conditional fields are not made visible or hidden until the browser is reloaded, or a different change to the owner element occurs.
There is a JavaScript AxiosError logged to the console when this happens, specifically Request failed with status code 302. Looks like the request that fails is to the actions/elements/update-field-layout action, so I assume this is the culprit 🙂
Add a Matrix field named "Matrix Field" using the Cards view mode to a field layout
Add a different field "Some Field" to the same layout, and create an entry condition rule [Matrix Field] [Has a value] for this field
Visit the edit page for an entry using this field layout. Create a nested entry in the Matrix field, and observe that the field layout is not updated after closing the nested entry slideout (i.e. the "Some Field" field is not made visible).
Reload the browser. Observe that the "Some Field" field is now visible.
Delete the nested entry from the Matrix field via the nested entry's card action menu. Observe that the field layout is not updated, i.e. the "Some Field" field is still visible.
Expected behavior
Adding and removing nested entries in a Matrix field should trigger field layout update to show or hide fields based on condition rules for the Matrix field, regardless of the Matrix field's view mode.
Actual behavior
Matrix fields using the Cards view mode does not trigger field layout update after adding or removing nested entries.
What happened?
Description
If a field has a condition rule "Has a value" dependent on a Matrix field using the Cards view mode, adding or deleting nested entries in that Matrix field does not automatically update the field layout. I.e. the conditional fields are not made visible or hidden until the browser is reloaded, or a different change to the owner element occurs.
There is a JavaScript
AxiosErrorlogged to the console when this happens, specificallyRequest failed with status code 302. Looks like the request that fails is to theactions/elements/update-field-layoutaction, so I assume this is the culprit 🙂Here's the JS error: https://pastebin.com/Hthd67wD
...and the full stack trace: https://pastebin.com/HJeBsduk
CleanShot.2025-01-28.at.13.03.23.mp4
Steps to reproduce
[Matrix Field] [Has a value]for this fieldExpected behavior
Adding and removing nested entries in a Matrix field should trigger field layout update to show or hide fields based on condition rules for the Matrix field, regardless of the Matrix field's view mode.
Actual behavior
Matrix fields using the Cards view mode does not trigger field layout update after adding or removing nested entries.
Craft CMS version
5.6.1
PHP version
8.2.26 (DDEV v1.24.1)
Operating system and version
macOS 14.6.1, MS Edge 131.0.2903.112
Database type and version
No response
Image driver and version
No response
Installed plugins and versions
None