You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I know that my request is somewhat vague. But unfortunately I have not yet been able to localise the error more precisely. There is a customised plugin that drafts a page including all content elements and then translates all the fields. An event is triggered for each field, via which the field receives its translation data if necessary. This used to work smoothly, but no longer does (without knowing me the time since it fails).
The point is, all standard craft fields on the page are still changed correctly and saved in the draft only. However, for all fields that are within a Neo structure, the translation is saved in both the draft and the regular entry. In this case, it seems as if no draft version of the Neo structure was created at all.
Is there a difference in what happens with a Neo field when a draft version is created in code with
Craft::$app->drafts->createDraft($entry, ...);
and then afterwards (after the translation) is saved via
Hey @ttempleton , thank you very much for your fast reply. I created a Matrix field and started the translation - and actually have the same behaviour as with the Neo field as described above. Apparently there really is a difference whether fields are built directly into the page or whether they are inside a Neo/Matrix field. So I will contact the Craft team directly - maybe they have an idea.
Bug Description
Hello, I know that my request is somewhat vague. But unfortunately I have not yet been able to localise the error more precisely. There is a customised plugin that drafts a page including all content elements and then translates all the fields. An event is triggered for each field, via which the field receives its translation data if necessary. This used to work smoothly, but no longer does (without knowing me the time since it fails).
The point is, all standard craft fields on the page are still changed correctly and saved in the draft only. However, for all fields that are within a Neo structure, the translation is saved in both the draft and the regular entry. In this case, it seems as if no draft version of the Neo structure was created at all.
Is there a difference in what happens with a Neo field when a draft version is created in code with
Craft::$app->drafts->createDraft($entry, ...);
and then afterwards (after the translation) is saved via
Craft::$app->getElements()->saveElement($element, false, false);
Or perhaps you have another idea that could explain the different behaviour?
By the way, if I create a draft in the Craft BE everything works out as expected.
Steps to reproduce
Sorry, as that is a custom plugin there is no chance for you to reproduce it.
Expected behaviour
No response
Neo version
4.1.3
Craft CMS version
4.9.5
What is the affected Neo field's propagation method?
Only save blocks to the site they were created 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: