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

Wrong block parent #8

Closed
yannkost opened this issue Jan 5, 2024 · 6 comments
Closed

Wrong block parent #8

yannkost opened this issue Jan 5, 2024 · 6 comments

Comments

@yannkost
Copy link

yannkost commented Jan 5, 2024

Bug Description

When I copy multiple blocks/all blocks from one entry to another, then the first block of those blocks is considered the parent of all following blocks. After the paste action, I'm unable to save the entry, due to this error.

Steps to reproduce

  1. Open an entry with several neoblocks in the same field
  2. Select the checkbox of the batch-actions plugin to select all blocks and click on "Copy"
  3. Go to another entry and click "Paste"
  4. Click save, then see the validation error message

Expected behaviour

The blocks should have the right parent block and none, if there is no parent block. (In this case, most of the blocks do not have a parent block.)

I also want to mention, that the graphical representation of the blocks if working well. Also the version of the craft-neo extension is 4.0.0. I will try if I can reproducte the error after the last update to 4.0.1...

Batch Actions version

1.3.1

Craft CMS version

4.5.13

@yannkost
Copy link
Author

yannkost commented Jan 5, 2024

Testet it also with the craft-neo v.4.0.1, but still the same error. The first of the copied blocks is consideret the parent of all other blocks.

image

@ttempleton
Copy link
Contributor

Thanks for making the bug report - I believe this is related to spicywebau/craft-neo#825 which I've just released Neo 4.0.2 to fix. Please let me know if 4.0.2 doesn't fix your issue, though.

@yannkost
Copy link
Author

yannkost commented Jan 8, 2024

I can confirm that the version 4.0.2 of Neo fixed the issue. Thanks!

@medoingthings
Copy link

I seem to have the same issue. I just updated to Neo 4.1.2 and noticed that for one field, all the child blocks moved to the parent level. Even after removing them and adding them as new childs.

Not sure when this issue was introduced – I updated from 4.0.7.

When I resaved the field and tried again to properly add children, it seemed to work again, but I would have to delete and re-add all children blocks. Is there a way to fix this in a way that the error disappears for existing content?

parent-block-issue

@ttempleton
Copy link
Contributor

@medoingthings If your Craft project does not use Preparse Field (which is known to cause the kind of issue shown in your screenshot, and we therefore list it as incompatible with Neo in our plugin compatibility documentation), please feel free to open a new Neo issue.

@medoingthings
Copy link

Thanks for the heads-up! The issue affected only a limited amount of entries, so I fixed them manually and moved on. No need for a new issue.

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