verbb / vizy

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

Can't remove entries in an Entries field within a Vizy block #299

Open bleepsandblops opened 1 month ago

bleepsandblops commented 1 month ago

Describe the bug

I feel like this is a new bug because I would have noticed it before, but if you create a simple Vizy block with just an Entries field, you can add to it fine but can't remove entries. If you save and go back to the post, the entries you've deleted are still there. If you remove all of them it seems to work.

Opening the entry

Screenshot 2024-05-12 at 15 35 56

Removing one related entry, before saving

Screenshot 2024-05-12 at 15 35 42

After saving and re-opening, it's still there

Screenshot 2024-05-12 at 15 35 36

Thank you!

Steps to reproduce

  1. Create a Vizy block with an Entries field, add this to an entry type
  2. Create an entry with this block, add a few items to it, save
  3. Open the entry again, and remove one or two entries, save
  4. The entries are still there

Craft CMS version

4.8.10

Plugin version

2.1.19

Multi-site?

No

Additional context

No response

engram-design commented 1 month ago

This would have to do with our mitigation of field changes until you interact with the field. This is done so that content changes aren't triggered when you haven't changed anything in the field. This is most common for nested Vizy fields, but can happen on just single level ones.

We watch for when you click in on a Vizy field, and have a flag to stop any changes from being recorded. Bizarrely, this doesn't seem to be triggered when clicking the remove button on an element select. Everything else about clicking in on a Vizy field and Vizy block is working correctly, but not the remove button. You can confirm this by clicking on anything else in the field first, then removing the entries.

Looking into options...

engram-design commented 1 month ago

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