-
Notifications
You must be signed in to change notification settings - Fork 63
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
Unable to change propagation method - Parent Element not found #842
Comments
If possible, could you please send a database backup and your composer files to [email protected] and let us know which field this is happening with (if the Craft project contains more than one Neo field), and we'll have a look at it. |
I just wanted to ask, if you have gotten the email with the database dump? I haven't gotten a confirmation on this side. :) (It's the weekend, so no worries :) ) On my side, I'm still working on the problem, making some discoveries in the database. A question arises: Does every neoblock have an entry in the table neoblockstructures? As I realized, the following query give me avout 8k of the 42k neoblocks that seems to be missing such an entry.
Generating this entry does not seem to hard, still, I would have to know, if the entry has to be present for each site or not. (Or just for the main site, as this is the current saving strategy I'm trying to change. |
@yannkost Sorry, yes, I have received the email, thanks for sending it. Unfortunately I wasn't able to download the database backup, could you please resend that? Regarding your other question - the |
@ttempleton oh, so the ownerId is the entryId where the block is being used, not the neoblock id, got it. I think all neoblocks have an structureelements line in the database. I just sent the database with another service, could you tell me, if this is working for you? |
As general information: Select * from neoblocks -> 42349 rows Select * from neoblocks n |
Confirming I have now received the database backup - thanks! |
For what I can see, the child blocks seem to want to append to the right parentId, but the structureId is wrong. |
Yep I believe you are correct. Craft's |
I'm going with following code for now:
|
I now also tried this, but when used, the entries on the other sites loses the field in the backend.... |
I've just pushed a fix for this that involves:
This fix looks to me to be working with your database; I'd like to do some more testing with my usual testing environment, and then I'll have a new release tagged tomorrow. |
@ttempleton sounds awesome, can you tell me, how I can get this fix? I will report back, if this is working on my end. |
If you'd like to try it out, you can do so by setting your composer.json file's |
@ttempleton Worked like a charm! Thanks you and if you have a "buymeacoffee" just tell me. This is a big save for me! |
Thanks for confirming that @yannkost - I am also happy with further testing on my usual testing environment, and have released Neo 4.0.5 including that fix. |
Bug Description
I'm trying to change the propagation method of a neo field to "Only save blocks to the site they were created in". When the queye Job is "Applying new propagation method to Neo blocks", following error occurs: Parent Element not found.
Note: The error occurs on a child block of a parent neoblock.
An interessing point, when debugging in the
craft-cms/queue/jobs/AppliyNewPropagationMethod.php
file, methodprocessItem
:For the parent all entries in structurelements seem to exist (there are 13 rows for 13 sites):
For some reason, the way the parentId for child blocks is decided seems erronous? Is there some kinda help to debug this partuclar problem?
Craft-CMS version: 4.7.1
Neo version: 4.0.3
Before trying to change the progapation method, I tried to clean up erronous fileds with gc/run, resaving neoblocks with the cli, removing drafts and all revisions, but no changes.
Steps to reproduce
Expected behaviour
No response
Neo version
4.0.3
Craft CMS version
4.7.1
What is the affected Neo field's propagation method?
Save blocks 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
The text was updated successfully, but these errors were encountered: