spicywebau / craft-neo

A Matrix-like field type for Craft CMS that uses existing fields
Other
402 stars 63 forks source link

[Craft 4] Two adjacent Neo block lists randomly merged their content/child blocks together #951

Open ericdrosas87 opened 1 month ago

ericdrosas87 commented 1 month ago

Bug Description

Screenshot 2024-09-30 at 14 14 38

Three days ago a content creator updated a page that contains Neo block fields and reported everything looking saving as expected. Today a different content creator went in to review the changes and noticed a message that stated “changes have been merged into this version” and then saw that the Accordion Group child blocks had merged with the CTA Grid blocks. There were no saves between three days ago and when the content creator discovered the merged child blocks. That is also to say that there are no revisions in the revision history that show where this change could have occurred. There were also no updates to the project config files nor version bumps to the Neo block plugin.

Steps to reproduce

I think this is what I am asking: how can this be possible? A queue job mangling the data perhaps?

Otherwise:

Create an entry structure with two Neo blocks next two each other, add child blocks to each, do something to trigger that “changes have been merged into this version” message, then see if the child blocks were merged.

Expected behaviour

The child blocks stay within their respective parent block lists.

Neo version

4.0.7

Craft CMS version

4.10.2

What is the affected Neo field's propagation method?

No response

Does this issue involve templating, and if so, is eager-loading used?

This is not a templating issue

TheFunkyMonk commented 1 month ago

I had a similar issue (which just came up again) and running garbage collection with php craft gc/run fixed it; hopefully, that helps. Definitely something strange going on with garbage collection related to Neo.

ttempleton commented 1 month ago

Yes - try to run garbage collection as @TheFunkyMonk has suggested (after upgrading to the latest Neo version, currently 4.2.16) and let me know if it happens again.