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 editing and saving a nested element a revision is not created until after you save the parent despite the changes to nested element being applied to the canonical element. This can be observed when using a Matrix field in table view mode (inline mode does not exhibit this behaviour). We also see this issue within Commerce when managing Products/Variants, as well as in our own nested elements.
Steps to reproduce
Requires a Matrix field with oneEntry type and field. The Matrix field should be set to "Display as an element index" and "Display in a table".
Create a new Entry and save.
A a new Matrix Entry and save, note a revision has been created.
Edit the Matrix Entry and save, note a revision hasn't been created. If you were to view the parent Entry on the frontend you will observe that the Matrix Entry edit is published.
Save the parent Entry, note a revision has now been created.
At the 1:00 minute mark the changes to the Matrix Entry are "live" so it doesn't appear to be a UI bug with the parent Entry not tracking changes. Craft does know something has changed as it will create the revision with the edits to the Matrix Entry when resaving the parent.
Expected behavior
When performing step 3 a revision is created.
Actual behavior
When performing step 3 a revision isn't created.
nested-element-revisions.mp4
Craft CMS version
5.5.4
PHP version
8.2.24
Operating system and version
Linux 6.11.6-orbstack-00279-g28c6c77332e6
Database type and version
MySQL 8.0.36
Image driver and version
Imagick 3.7.0 (ImageMagick 6.9.11-60)
Installed plugins and versions
No response
The text was updated successfully, but these errors were encountered:
ryansupercool
changed the title
[5.x]: Changes to nested elements don't result in revision being created until the parent is saved
[5.x]: Changes to nested elements don't result in a revision being created until the parent is saved
Nov 30, 2024
What happened?
Description
When editing and saving a nested element a revision is not created until after you save the parent despite the changes to nested element being applied to the canonical element. This can be observed when using a Matrix field in table view mode (inline mode does not exhibit this behaviour). We also see this issue within Commerce when managing Products/Variants, as well as in our own nested elements.
Steps to reproduce
Requires a Matrix field with oneEntry type and field. The Matrix field should be set to "Display as an element index" and "Display in a table".
At the 1:00 minute mark the changes to the Matrix Entry are "live" so it doesn't appear to be a UI bug with the parent Entry not tracking changes. Craft does know something has changed as it will create the revision with the edits to the Matrix Entry when resaving the parent.
Expected behavior
When performing step 3 a revision is created.
Actual behavior
When performing step 3 a revision isn't created.
nested-element-revisions.mp4
Craft CMS version
5.5.4
PHP version
8.2.24
Operating system and version
Linux 6.11.6-orbstack-00279-g28c6c77332e6
Database type and version
MySQL 8.0.36
Image driver and version
Imagick 3.7.0 (ImageMagick 6.9.11-60)
Installed plugins and versions
No response
The text was updated successfully, but these errors were encountered: