- Issue created by @peterwcm
- 🇮🇳India arunsahijpal
Hi @peterwcm,
I've updated the createDuplicate method please check.Also @berdir pls check is this a good solution?
Thanks,
Arun - 🇹🇼Taiwan peterwcm
Hi @arunsahijpal,
Thanks for working on this. The patch fixes the issue, but it causes orphaned paragraphs to be created before users save the node. I think there could be issues with translations as well.
I'm puzzled about the
!$item->entity->isNew()
condition, as it seemed to work fine without it before. Could we consider removing that condition instead? @berdirRegards
Peter
- 🇮🇳India arunsahijpal
@peterwcm,
I've updated the code and now no more orphaned paragraphs and everything saves when the node saves by referencing the entity directly instead of manually setting target_id.
and I also think this condition!$item->entity->isNew()
is not necessary.
For the translation thing there is one limitation that - Paragraphs are referenced entities, not simple text fields.
Drupal does not natively support translating entity reference fields.
When I tried to translate it shows this error* (unsupported) Paragraphs fields do not support translation
. Yo can checkout this link → for more info .
I think there is one tot check translation with Paragraphs Library module but I'm not sure.
Could you pls check it, if it works then I think we can safely remove that condition. - 🇹🇼Taiwan peterwcm
Hi @arunsahijpal,
Thanks for addressing this so quickly.
I just did some quick tests, and the latest patch has fixed the issues.