verbb / vizy

A flexible visual editor for Craft CMS
Other
43 stars 8 forks source link

Saving an element from a relational field within slide out modal wipes out vizy block #179

Closed zhua89cc closed 1 year ago

zhua89cc commented 1 year ago

Describe the bug

So basically we have a page builder that is a vizy field in which we have a multitude of different types of custom blocks. A majority of them have relational fields to add either an entry, or an asset to the block. Basically when building out the content we can add an entry, asset, category and save which works fine.

However when double clicking the element from the field which in craft 3 give you a slide out tray so you can edit the element in the same page, saving said element, and then saving the original page the vizy block is on it will wipe out the contents of that vizy block.

Here is a video of the bug on a vizy custom block that is a matrix field. https://www.loom.com/share/9b722372202e4470b9e386ce585e7a1f

Here is a video of the bug on a different vizy custom block that is just a few fields. Two of which are relational fields. https://www.loom.com/share/2b7b247b64374c8bbd9423879d068510

Steps to reproduce

  1. Add a vizy field with a custom block to an entry layout. Make sure that vizy custom block has some relational field to it. Could be an asset, entry, category.
  2. Create a new entry with this vizy field and add the custom block. Add the relational element to the field. Save the Entry
  3. It should save no problem with your data in the custom block still there.
  4. Double click the element so the slide out tray comes out. You can edit the element or not. Hit Save on the element so you get back to the original entry.
  5. Now save the entry and the information from the custom vizy block will have dissapeared.

Craft CMS version

3.7.55.3

Plugin version

1.0.20

Multi-site?

No

Additional context

Able to reproduce locally and on dev and production

engram-design commented 1 year ago

Fixed for the next release. To get the fix early, change your verbb/vizy requirement in composer.json to:

"require": {
  "verbb/vizy": "dev-craft-3 as 1.0.20",
  "...": "..."
}

Then run composer update.

zhua89cc commented 1 year ago

thanks for the quick response!

engram-design commented 1 year ago

Fixed in 1.0.21