[5.x]: Matrix Entries status - Live preview
What happened?
Description
When editing an entry and opening the live preview modal, it is not possible to change the status of a matrix block and see the changes in the preview.
Steps to reproduce
- Edit an entry with a matrix block
- Open the live preview
- The blocks are shown in the preview
- Change the status of a single block to be disable
- The block is still showing in the preview
Expected behavior
The block should disappear from the page.
Actual behavior
The block is still there.
Craft CMS version
5.4.1
PHP version
8.2
Operating system and version
No response
Database type and version
mysql 8.0
Image driver and version
No response
Installed plugins and versions
Hi, thanks for getting in touch! What view mode is this matrix field using?
Hi, thanks for getting in touch! What view mode is this matrix field using?
The field is in "as card" view mode
Thanks for confirming! I think I see what you mean. When you change the status, you don’t save the nested entry (block), right?
Exactly, I've played around a little bit an I think I understand the problem now.
Every nested entries needs to be saved/published before his parent can display the change in the live preview.
Live preview is only useful if the entry contains basic fields to display the drafts changes.
We’ll discuss this internally.
Would just like to add we noticed this while saving draft pages where their nested entries (within a content builder matrix) would be saved with a live status instead of draft. Changing out of card view does save the draft correctly but the card view would be ideal as it can offer a better editing experience in many cases.
Edit: just saw this was already covered under planned improvements on the Craft roadmap page
Craft 5.5.0 is out which improves on the nested entry workflow quite a bit, including for Live Preview (#16002).