What happened?
Description
Changes to a matrix field's nested entries are inconsistently reflected in live preview, depending on a matrix field's view mode.
When the view mode is set to Inline-Editable Blocks, changes to nested entries are reflected in live preview as you would expect.
When a matrix field's view mode is Cards or Element Index, live preview behaves differently, and requires the edited nested entry to be saved (ie published live) to see changes. However they're not really being previewed, as they are now published live, perhaps unexpectedly when the intention was to preview.
If you just click Close on the nested entry instead of Save, a draft is created, but the draft content isn't reflected on the Live Preview either.
As the functionality exists to display nested entries in live preview as per Inline-Editable Blocks, I wondered if it would be possible to extend this to the other two view modes?
Thanks for considering!
Steps to reproduce
- Set up an entry with a template for live previewing. Give it a matrix field, with its view mode set to Cards or Element Index.
- Edit the entry in live preview, making changes to one of the nested matrix entries.
- Changes are not shown on the live preview without saving the nested entry.
- Change the matrix field's view mode to Inline-Editable Blocks
- Edit again, and observe that changes are visible in live preview without saving.
Expected behavior
Workflow for previewing and publishing content to be consistent, regardless of view mode.
Actual behavior
Changes made in live preview can only be seen when the view mode is Inline-Editable Blocks. Changes need to be saved to preview when the view mode is Cards or Element Index.
Craft CMS version
Craft Solo 5.4.10
PHP version
8.2.22
Operating system and version
Linux 6.10.11-linuxkit
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
- CKEditor 4.3.1
- CP Field Inspect 2.0.2
What happened?
Description
Changes to a matrix field's nested entries are inconsistently reflected in live preview, depending on a matrix field's view mode.
When the view mode is set to Inline-Editable Blocks, changes to nested entries are reflected in live preview as you would expect.
When a matrix field's view mode is Cards or Element Index, live preview behaves differently, and requires the edited nested entry to be saved (ie published live) to see changes. However they're not really being previewed, as they are now published live, perhaps unexpectedly when the intention was to preview.
If you just click Close on the nested entry instead of Save, a draft is created, but the draft content isn't reflected on the Live Preview either.
As the functionality exists to display nested entries in live preview as per Inline-Editable Blocks, I wondered if it would be possible to extend this to the other two view modes?
Thanks for considering!
Steps to reproduce
Expected behavior
Workflow for previewing and publishing content to be consistent, regardless of view mode.
Actual behavior
Changes made in live preview can only be seen when the view mode is Inline-Editable Blocks. Changes need to be saved to preview when the view mode is Cards or Element Index.
Craft CMS version
Craft Solo 5.4.10
PHP version
8.2.22
Operating system and version
Linux 6.10.11-linuxkit
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