What happened?
Description
When opening a related entry in an element slideout, if that entry's field layout contains conditional visibility rules (e.g., a lightswitch controlling whether other fields are shown), the update-field-layout action fails with "Invalid element UUID". The error occurs immediately when the slideout renders and when interacting with the lightswitch.
The same conditional layout works correctly when the entry is opened in full-page edit view.
In my case, the related entry is on a different site.
Steps to reproduce
- Have an entry type with an entries field that can select entries from a different site.
- The related entry type should contain a Matrix field.
- Inside that Matrix, have an entry type with a lightswitch field and conditional layout rules (e.g., fields visible only when lightswitch is on).
- Open the entry with a selected related entry in the relation/entry field.
- Click the related entry chip to open it in slideout.
- Try flipping the lightswitch to show the conditional fields.
Expected behavior
The slideout should show / hide fields based on the current lightswitch state, and respond to changes.
Actual behavior
Immediately on slideout load, the following error is returned:
400: POST actions/elements/update-field-layout&site=default {"name":"Bad Request","message":"Invalid element UUID: <uuid>","code":0,"status":400}
Toggling the lightswitch fires the same error again. Fields do not show/hide.
After toggling the lightswitch, closing and re-opening the slideout makes the fields visible / hidden.
Craft CMS version
Craft Pro 5.10.2
PHP version
8.3.30
Operating system and version
Linux 6.1.170
Database type and version
MySQL 8.0.42
Image driver and version
Imagick 3.8.1 (ImageMagick 6.9.11-60)
Installed plugins and versions
No response
What happened?
Description
When opening a related entry in an element slideout, if that entry's field layout contains conditional visibility rules (e.g., a lightswitch controlling whether other fields are shown), the update-field-layout action fails with "Invalid element UUID". The error occurs immediately when the slideout renders and when interacting with the lightswitch.
The same conditional layout works correctly when the entry is opened in full-page edit view.
In my case, the related entry is on a different site.
Steps to reproduce
Expected behavior
The slideout should show / hide fields based on the current lightswitch state, and respond to changes.
Actual behavior
Immediately on slideout load, the following error is returned:
400: POST actions/elements/update-field-layout&site=default {"name":"Bad Request","message":"Invalid element UUID: <uuid>","code":0,"status":400}Toggling the lightswitch fires the same error again. Fields do not show/hide.
After toggling the lightswitch, closing and re-opening the slideout makes the fields visible / hidden.
Craft CMS version
Craft Pro 5.10.2
PHP version
8.3.30
Operating system and version
Linux 6.1.170
Database type and version
MySQL 8.0.42
Image driver and version
Imagick 3.8.1 (ImageMagick 6.9.11-60)
Installed plugins and versions
No response