Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.x]: All Neo blocks duplicated on an entry #11250

Closed
weotch opened this issue May 17, 2022 · 3 comments
Closed

[3.x]: All Neo blocks duplicated on an entry #11250

weotch opened this issue May 17, 2022 · 3 comments

Comments

@weotch
Copy link
Contributor

weotch commented May 17, 2022

What happened?

Description

We've seen a number of cases of all the Neo blocks on an Entry being duplicated. We've been able to recover from this issue by going back to an older version from before the duplication occurred and choosing "Revert content from this revision".

Steps to reproduce

I haven't been able to find a clear way to reproduce this, but I do have a database sql export from after the most recent time it happened if that can assist in troubleshooting. I observed this happening today when I:

  1. Went to an entry and chose "Add a site" (the Section is set to "Let each entry choose which sites it should be saved to").
  2. Enabled the entry in the new site via the sidebar (the Default Status for the site is disabled)
  3. Saved the entry

In the new revision that was created after the save, not only were the blocks duplicated, a Redactor field's value had reverted to a previous revision's state. I suspect the issue is that my CMS user had a draft version of the entry that was old and when Craft tried to merge the current state with mine, it:

  • Saw the my olds and the new blocks as different and concatenated them rather than updating them
  • Chose my value for that Redactor field rather then the newer value from the server

Expected behavior

No duplication of blocks.

Actual behavior

All Neo blocks are duplicated, maintaining their original order. See this screenshot:

duplicated-blocks

Craft CMS version

3.7.39

PHP version

7.4.29

Operating system and version

Darwin 21.4.0

Database type and version

MySQL 8.0.29

Image driver and version

GD 7.4.29

Installed plugins and versions

Colorit 1.1.2.1
Control Panel CSS 2.4.0
Control Panel JS 2.4.0
Dashboard Begone 1.0.1
DigitalOcean Spaces Volume 1.1.3
Documentation 2.1.2
Feed Me 4.5.0
Importable Shopify Feeds 1.3.1
Neo 2.13.5
Redactor 2.10.7
Sentry 1.5.1
Super Table 2.7.1
Translations 2.7.1
Webhooks 2.4.1
@brandonkelly
Copy link
Member

Are you able to reproduce this with a Matrix field? If not, it may be Neo-specific, and would need to be reported at https://github.com/spicywebau/craft-neo/issues/ instead. Either way, we (or Spicy Web) will need some reliable steps to reproduce, before we can look into it.

@Kethatril
Copy link

First sorry for the info dump ha, we are still in the process of trying to reproduce this.

We have seen this occur with Matrix fields, Super Table and Neo. We haven't been able to reproduce locally but it has happened multiple times on different sites over the last few months.
In some cases static Super Table blocks have been duplicated, in others all the Matrix blocks or Neo blocks on an entry were duplicated and in one case a static Super Table had been removed completely.

We have seen this occur on 3 sites now:

1:
CraftCMS version greater then 3.7.20. It started happening after we updated from 3.7.20 to 3.7.34 and continued happening after updating to 3.7.46.
Super Table: 2.7.1
Neo: 2.13.12
Multi-site: No.
On 24 entries of the same section type all Super Table blocks were duplicated. This also occurred a single time on another section type. This occurred at various times over the last few months after the update to 3.7.34. We are not sure of the exact trigger as it happened on a clients site and we were only made aware of it recently.
It looks like the duplicated blocks have the same created date as the entries edited date. There also might have been duplicated Neo blocks but not many.

2:
CraftCMS version greater then 3.7.3.2. It started happening at some point after updating from 3.7.3.2 to 3.7.38.
Super Table: 2.7.1
Multi-site: Yes.
On several entries all Matrix blocks and all Super Table blocks were duplicated. It seems like some of the duplicated blocks had old content that had been replaced some time ago.
In one case both static super table blocks on the entry had been removed completely despite one of them having required fields (along with being static super tables so the editor could not have removed them).

3:
CraftCMS version 3.7.33
Multi-site: No.
Neo: 2.12.5
On a single entry all Neo Blocks on the page had been duplicated.

In all of the above cases the fields had a new id and uid. In all instances I looked at in the database the dateCreated and dateUpdated of the duplicate field was identical to the owner entry's dateUpdated

I just found #11466 what was fixed recently. It might explain 2, but 1 and 3 are not multi-site. and for 1 it continued to happen after updating to 3.7.46

@brandonkelly
Copy link
Member

Going to close this in favor of #11609, which @ttempleton suspected may be related.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants