verbb / vizy

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

Nested Vizy fields throw an error #242

Closed rmales closed 11 months ago

rmales commented 11 months ago

Describe the bug

With a Vizy field that contains a block that contains another Vizy field, when I add that block to my entry this Javascript error is thrown:

Uncaught TypeError: Cannot read properties of undefined (reading 'isNew')
    at VizyInput.vue:523:51

https://github.com/verbb/vizy/blob/0b44da60c62e59bf3795dad005f610ad3ed0fb71/src/web/assets/field/src/js/components/VizyInput.vue#L523

I believe this causes issues with the Craft drafts system in some cases due to the last serialized value being mismatched.

Steps to reproduce

  1. Create a Vizy field containing a block containing another Vizy field and add that to an entry type
  2. Create an entry of that type and add the block

Craft CMS version

4.4.16.1

Plugin version

2.1.7

Multi-site?

No

Additional context

No response

engram-design commented 11 months ago

Fixed for the next release. To get this early, run composer require verbb/vizy:"dev-craft-4 as 2.1.7"

engram-design commented 11 months ago

Fixed in 2.1.8