verbb / smith

A Craft CMS plugin to add copy, paste and clone functionality to Matrix blocks.
MIT License
25 stars 9 forks source link

Unable to clone or paste blocks that contain a Vizy field #38

Closed bencarr closed 3 weeks ago

bencarr commented 4 months ago

Describe the bug

Using Craft 4 and Vizy 2, cloning or pasting a Matrix block that contains a Vizy field throws an exception from smith/field/render-matrix-blocks with the message Matrix block is missing its owner ID. Block types that do not contain a Vizy field clone and paste successfully.

Could be the same issue as #19, but there's so few details in that issue it's hard to verify. Providing fresh reproduction steps here with the latest versions of Craft and the relevant plugins.

Steps to reproduce

  1. Create a fresh Craft 4 site (4.8.8)
  2. Install Vizy (2.1.18) and Smith (2.0.1) plugins
  3. Create a Matrix field with a block type containing a Vizy field
  4. Add the Matrix field to an entry type in a new section and create a new entry
  5. Add a block using the block type that contains the Vizy field
  6. Select "Clone" from the block's actions menu

Block type is not cloned, and 500 response and exception JSON are visible in the Network panel of the browser's dev tools.

Craft CMS version

4.8.8

Plugin version

2.0.1

Multi-site?

No

Additional context

No response

engram-design commented 4 months ago

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

Note there's a current limitation on cloning Matrix blocks within a Vizy block, but the other way around should be okay (Matrix field containing Vizy fields)

bencarr commented 4 months ago

Fix confirmed! Thanks for the quick turnaround, Josh! I'll keep an eye out for when that next Vizy release drops.

engram-design commented 3 weeks ago

Fixed in Vizy 2.1.19