When adding translations for nodes, Paragraph Defaults overrides the source nodes already created paragraphs, with the Content Type default defined, instead of copying the exsisting paragraphs from the node translation source.

Comments

rv0’s picture

Confirmed. Will see what I can do.

programeta’s picture

Version: » 7.x-1.0
Status: Active » Needs review
StatusFileSize
new607 bytes

Hi,

I reviewed the problem and with this fix the problem is solved.

Regards,

jkopel’s picture

Ran into this same issue and the patch in #2 works for me.
Thanks @programeta!

chrisfromredfin’s picture

I found the same thing, but yet another scenario. It seems like the module is a bit overzealous in its understanding of when to provide the default, not that I'm sure what entirely can be done about it.

In my example, I'm use node_clone to clone a node from another node (this works correctly with paragraph entities). However, my defaults are set instead of the ones I'm cloning from.

I couldn't think of a way to selectively call the form alter hook, except to fake it out with a lower-weighted form_alter and fake a $form_state['input'] or something. So I found this issue and a similar fix works for me:

      if (!isset($id) && !isset($entity->translation_source) && !isset($entity->clone_from_original_nid)) {

...I'm not convinced this is exactly the right thing, but I'm not sure what other options there are.

prudloff’s picture

StatusFileSize
new655 bytes

I had the same problem as #4 when using paragraphs_defaults with the clone module.
Here is a patch that can be used to apply the fix.