Closed AyupMike closed 6 months ago
I'll give this a test shortly, but wanted to check if this happens without a Neo field in the mix? Do two of your non-Neo field blocks retain their sorted order?
And JS errors in your web developer tools console?
Thanks Josh.
Looks to be due to the code here for Neo.
I've been warned about Vizy doing a similar thing (see https://github.com/verbb/vizy/issues/224), but I believe this is because the Neo field is being re-initialized when the block is moved. This is somewhat unavoidable due to how Vue renders things, but it's producing buggy behaviour like you describe. You might also notice a duplicate "add" button for Neo.
I'll see what can be done about this, but basically Neo is forcing the entries data to be "reset" every time their field is rendered. I'm not sure why they do this, and it's probably our fault due to re-initializing the Neo field when it moves (but that's just how Tiptap/Vue works).
Looks like another issue with Neo (see https://github.com/spicywebau/craft-neo/pull/818), but I've managed to fix what I can in Vizy.
Fixed for the next release. To get this early, run composer require verbb/vizy:"dev-craft-4 as 2.1.13"
Fixed in 2.1.14
Describe the bug
I'm experiencing some strange behaviour when re-ordering Vizy blocks in the editor, where the ordering of blocks doesn't get saved correctly when a block contains a Neo field.
It appears that once a block which contains a Neo field is moved to the first position, it then can't be moved to any other position and is "stuck", despite being able to change the order within the editor.
See video below for clarity:
https://github.com/verbb/vizy/assets/11300657/2cb377df-4c6f-4ba0-866a-567afcc3ff19
I am unsure if this is an issue with Vizy or Neo, so reporting here first.
Steps to reproduce
Setup
Vizy
field and add two new blocks to the fieldNeo
field typeNeo
field typeNeo
field first, then add the Vizy block which does not contain theNeo
fieldVizy
editor now.Replication of the bug
Neo
field is below the block without theNeo
fieldCraft CMS version
4.5.11.1
Plugin version
2.1.13
Multi-site?
No
Additional context
Installed plugins