Closed iamEAP closed 8 years ago
Regression test for this confirms that only Paragraphs are affected. Neither field collections nor standard entity references are impacted.
Further investigation reveals that this may be a bug in Paragraphs itself...
$node = entity_metadata_wrapper('node', $nid_of_translation);
$node->field_paragraphs->value();
// Yields English paragraphs.
Edit: Aaand even further investigation reveals that it's a firing order thing...
// Yields translated paragraphs.
$node = entity_metadata_wrapper('node', $nid_of_translation);
$node->field_paragraphs->value();
// Yields source paragraphs.
$source = entity_metadata_wrapper('node', $nid_of_source);
entity_xliff_get_translatable($source)->getTargetEntity('fr')->field_paragraphs->value();
// Yields source paragraphs.
$target = entity_metadata_wrapper('node', $nid_of_target);
$target->field_paragraphs->value();
Net-new imports of content with Paragraphs work as expected... However, if content that includes paragraphs is imported over an existing translation, the translations on the import will overwrite the source content (irrevocably losing the source content).