cms icon indicating copy to clipboard operation
cms copied to clipboard

[5.x]: Matrix Entries status - Live preview

Open rgauthier4c4 opened this issue 1 year ago • 6 comments

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

  1. Edit an entry with a matrix block
  2. Open the live preview
  3. The blocks are shown in the preview
  4. Change the status of a single block to be disable
  5. 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

rgauthier4c4 avatar Sep 10 '24 13:09 rgauthier4c4

Hi, thanks for getting in touch! What view mode is this matrix field using?

i-just avatar Sep 11 '24 12:09 i-just

Hi, thanks for getting in touch! What view mode is this matrix field using?

The field is in "as card" view mode

rgauthier4c4 avatar Sep 11 '24 12:09 rgauthier4c4

Thanks for confirming! I think I see what you mean. When you change the status, you don’t save the nested entry (block), right?

i-just avatar Sep 11 '24 12:09 i-just

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.

rgauthier4c4 avatar Sep 11 '24 12:09 rgauthier4c4

We’ll discuss this internally.

i-just avatar Sep 12 '24 06:09 i-just

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

bliswebagency avatar Sep 26 '24 01:09 bliswebagency

Craft 5.5.0 is out which improves on the nested entry workflow quite a bit, including for Live Preview (#16002).

brandonkelly avatar Nov 12 '24 17:11 brandonkelly