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

Duplicate entries appear in orders yaml files when deleting block types #887

Open
tremby opened this issue May 9, 2024 · 0 comments
Open
Labels
bug status: confirmed A bug report that has been reproduced by the maintainer(s), but has not yet been fixed bug

Comments

@tremby
Copy link

tremby commented May 9, 2024

Bug Description

I'm quite often finding during code review one or more duplicates at the end of config/projects/neo/orders/*.yaml files.

Right now I'm looking at this diff, and the only thing I've done is deleted the "department highlights card" neo block type.

@@ -39,8 +39,8 @@
 - 'blockTypeGroup:080b02f6-816e-4266-9f50-7c2ac3d8ba5b' # Children
 - 'blockType:bedff732-5ad7-4d25-9543-63673868cafd' # Bio
 - 'blockType:cf698005-da80-438f-b310-5638b824aeac' # Career Department Card
-- 'blockType:53645874-c025-428a-b2ec-d081bc20ebc3' # Department Highlights Card
 - 'blockType:d9f5b8a6-b72c-42fa-a7a5-326d621b7902' # Restaurant
 - 'blockType:03e7a121-7774-49ad-ac2a-88e2fa3cb9f4' # Step
 - 'blockType:b4a31fa7-459b-4a03-a72a-a64c59555dc1' # Tab Slider Slide
 - 'blockType:b4a31fa7-459b-4a03-a72a-a64c59555dc1' # Tab Slider Slide
+- 'blockType:b4a31fa7-459b-4a03-a72a-a64c59555dc1' # Tab Slider Slide

If I look at the history of that file, I see that the last time it was changed, it was also on a removal of a block, and the final entry in the file got duplicated then too:

@@ -21,7 +21,6 @@
 - 'blockTypeGroup:0cda5288-1b78-4a3d-b728-0fd2972f2926' # CTA
 - 'blockType:9974efea-d4f4-457e-a94c-13f96026c631' # CTA and image trio
 - 'blockType:287d8931-99d2-4dc9-b46f-7497a7340a68' # CTA and image trio (reference)
-- 'blockType:96ac2465-4efe-4cf8-8c63-1644fb793088' # Newsletter Sign-up
 - 'blockType:1eec4ce0-ceb1-4815-bcfe-c28b21c85ea3' # Quick Actions CTA
 - 'blockType:2077f50b-6dc0-42a7-9bf5-9d7abaf685c7' # Slim CTA
 - 'blockTypeGroup:a5e1e5ad-e902-4b00-9955-f702fa13a9f6' # Related content
@@ -44,3 +43,4 @@
 - 'blockType:d9f5b8a6-b72c-42fa-a7a5-326d621b7902' # Restaurant
 - 'blockType:03e7a121-7774-49ad-ac2a-88e2fa3cb9f4' # Step
 - 'blockType:b4a31fa7-459b-4a03-a72a-a64c59555dc1' # Tab Slider Slide
+- 'blockType:b4a31fa7-459b-4a03-a72a-a64c59555dc1' # Tab Slider Slide

This doesn't appear to be dangerous, but it's confusing noise in diffs and therefore code review.

Steps to reproduce

Sorry, I don't have solid steps for this; all I can really say is that it seems to happen (sometimes?) when deleting a block type.

Expected behaviour

No duplicate entries.

Neo version

4.0.6

Craft CMS version

4.8.0

What is the affected Neo field's propagation method?

"save to all sites the owner element is saved in"

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

This is not a templating issue

@ttempleton ttempleton added bug status: confirmed A bug report that has been reproduced by the maintainer(s), but has not yet been fixed and removed bug status: new labels May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug status: confirmed A bug report that has been reproduced by the maintainer(s), but has not yet been fixed bug
Projects
None yet
Development

No branches or pull requests

2 participants