What happened?
Description
In the field layout editor, deleting a field causes issues if you have another field that has a condition that depends on the deleted field. After deleting the field, double-clicking the field with the condition (or using … → Settings) shows an error notification:
Invalid field layout element UUID:

Steps to reproduce
- Add two fields to an entry field layout.
- In the settings of the second field, add any condition that points to the first field.
- Delete the first field and save the field layout.
- Try to open the settings for the second field.
Expected behavior
Deleting a field should either:
- automatically delete any conditions that other fields have in relation to the deleted field, and display a corresponding warning/info message.
- prevent the deletion of the field until all conditions that depend on the field are removed manually.
Actual behavior
The field layout ends up in an erroneous state with no clear path to recover from the error.
Craft CMS version
5.2.5
PHP version
8.3
Operating system and version
No response
Database type and version
No response
Image driver and version
No response
Installed plugins and versions
No response
What happened?
Description
In the field layout editor, deleting a field causes issues if you have another field that has a condition that depends on the deleted field. After deleting the field, double-clicking the field with the condition (or using
… → Settings) shows an error notification:Steps to reproduce
Expected behavior
Deleting a field should either:
Actual behavior
The field layout ends up in an erroneous state with no clear path to recover from the error.
Craft CMS version
5.2.5
PHP version
8.3
Operating system and version
No response
Database type and version
No response
Image driver and version
No response
Installed plugins and versions
No response