Cms: Changes in nested Matrix fields are not shown during Live Preview

Created on 29 Jul 2020  路  14Comments  路  Source: craftcms/cms

Description

When I edit a page during Live Preview, changes in a nested Matrix field are only shown on the first change.

It seems when I make changes in Live Preview, a draft is created. When I change values in normal text fields or in a field inside a standalone Matrix field, that change is shown.
When I make additional changes to a Matrix block field _ inside a Supertable _ inside a Matrix, those changes are not shown.

It also appears the LinkIt field type has the same kind of issues, even in a standalone Matrix field. That might be a bug on it's own or related. Still investing some more.

Update
It appears additional changes to a Super Table field inside a normal Matrix field are also not shown, just the first change.
Sorry if I reported it in the wrong place, it seems to point in that direction.

Steps to reproduce

  1. Create a Matrix field where one of the blocks has a Super Table field
  2. In that Super Table field create 1 Matrix field
  3. In that nested Matrix field create some blocks with some fields
  4. Edit a page in normal edit more and add some blocks in the nested Matrix.
  5. Save that page
  6. Edit the same page now in Live Preview
  7. Change some values anywhere, a draft is created
  8. Change some values in the nested Matrix block, see the first change
  9. Change those values fields again, see no change

Additional info

  • Craft version: 3.4.30
  • PHP version: 7.4
  • Database driver & version: MySQL 5.7
  • Plugins & versions:

    • Amazon S3 1.2.9

    • Embedded Assets 2.3.2

    • Field Manager 2.1.8

    • Freeform Pro 3.7.1

    • Imager 2.4.0

    • LinkIt 1.1.11

    • Minify 1.2.10

    • Navigation 1.3.22

    • Redactor 2.6.1

    • Retour 3.1.39

    • Super Table 2.5.3

    • Typogrify 1.1.18

    • Video Embedder 1.1.14

    • XML Sitemap 1.2.0

bug

Most helpful comment

Finally got to the bottom of this, and it has been fixed for the next release!

All 14 comments

When you make changes in the nested field, do you see the autosave spinner up at the top?

Yes I do, very briefly, followed by the "draft was saved"-icon.

We have a similar setup and the same bug.

For us the "draft was saved" icon appears and disappears again whenever a draft is created or a field besides the nested Matrix/Super Table field. But after the first edit in the nested Matrix/Super Table field, the icon appears but never disappears.

Having the same issue in Craft 2

@brandonkelly I'm having the exact same issue in Craft 3.4.30.

In live preview, it's not saving my edits, but if I don't use live preview to make an edit and save then it's fine.

@brandonkelly This also happens on 3.5

I've also stumbled upon this, and filed an issue here https://github.com/craftcms/cms/issues/6553.

Seems to me this hasn't anything to do with live preview, but it's related to using drafts as you can experience the same error without opening live preview.

Same issue here. My setup (craft 3.4.30, supertable: 2.5.4)

Neo -> Supertable -> Matrix block.

When i edit the entry without being in live preview -> everything is fine.

When i open Live preview the matrix content is still there. But while editing the entry in live preview, the matrix block is deleted, the content is gone. I can still see it in the edit view, but in the background the content is lost.

After saving or publishing, the matrix block is gone.

Finally got to the bottom of this, and it has been fixed for the next release!

hm, i cannot confirm, that this is fixed. I am easily able to run into a situation where data is no longer being update while i am editing content in Live preview.

Setup as described:
Neo Field -> Supertable -> Matrix Block inside.

  1. Create new entry
  2. Open Live preview
  3. Crate Neo Block. Add Matrix Block inside of Supertable.
  4. Close Supertable -> Save Entry
  5. Everything Fine

  1. Open this entry again.
  2. Add new Neo Block
  3. Open Live Preview
  4. Change any field in Matrixblock from initial save
  5. Live preview doesn't update
  6. After publishing, the data i put in is gone.

All Plugins up to date (Neo: 2.8.6, ST: 2.6.1, Craft: 3.5.5), Multisite Setup

@dennismeissner We have not released the fix yet.

Craft 3.5.6 is out now with that fix.

Tested and working fine - thanks again everyone!

Thanks for the fix working as usual

Was this page helpful?
0 / 5 - 0 ratings