- Issue created by @murz
- π¬π§United Kingdom SirClickALot Somerset
Agreed, but strictly only with an option in my opinion because often, we might others to clone our nodes that contain references to Paragraphs they they should not own copies of.
For example, in our educational site we have Chapters of learning.
Chapters of learning are broken up into Topics.
Topics are rigorously-vetted content reviewed by senior education specialists.A Teacher might wish to make a copy of a Programme and make a variation of their own and that's fine but if they choose to keep one or more Topics then there is no way that they should have ownership of that content because we cannot then vouch for its quality.
While I can see your requirement here, I also think it's beyond the scope of what this module aims to achieve which is merely to pre-fill a form with existing values, with the emphasis on the word values.
By contrast, you may find that the Replicate UI β module is what you are after because that one does exactly what you're asking for here and does so however deep the tree is.
- π¦π²Armenia murz Yerevan, Armenia
I agree that this should be optional and disabled by default.
But still, it is the case for the current module because other solutions like the suggested "Replicate UI" or "Entity Clone" - immediately create a copy, instead of pre-filling the entity form.
Seems, we still can pre-fill reference fields there too, if the form uses the "Inline Entity Form" widget type, to implement this feature.
Because with that "Paragraphs" module, we can fill manually the node form, add several paragraphs there, and they will be stored in the form state, without creating actual entities until we click "Create" and submit the full form.
Can we implement the same behavior by pre-filling referenced fields?
- π¦π²Armenia murz Yerevan, Armenia
And from the implementation point of view, seems we can create a new plugin, like the current "EntityLabelCloneSuffix", attached to only the "entity_reference" field type, that will do the thing.
- πΊπ¦Ukraine Tolyan4ik Lviv
Here is patch with Field processor to duplicate related entity.
- @tolyan4ik opened merge request.
- Status changed to Needs review
over 1 year ago 2:56pm 26 June 2023 - Status changed to RTBC
over 1 year ago 5:03am 27 June 2023 - π¦π²Armenia murz Yerevan, Armenia
I've tested the proposed fix and it works pretty stable! A couple of renamings and minor fixes from my side have been pushed, so let's move to Reviewed status.
- Status changed to Needs work
7 months ago 1:37am 15 April 2024 - π―π΅Japan orakili
This doesn't seem to work with some entity reference widgets like the media library or the inline entity form β module.
@Murz, would you be able to indicate with what widgets this plugin worked?