Paragraphs translations aren't updated when imported with file import (with Auto accept finished translations enabled)

Created on 9 April 2021, over 3 years ago
Updated 28 June 2023, over 1 year ago

Problem/Motivation

When importing a translation with Auto accept finished translations enabled on the translation provider, the new translated value doesn't get added to any paragraphs.

If you disable the Auto accept finished translation option and accept the translation from the Job items review form, it all works as excepted.

Looking at one of the paragraphs fields table you can see that a new revision is created with the new translation. But then another revision is created with the old value, and that's the paragraph that gets referenced on its host.

Using 8.x-1.11 it works as expected.

I did some digging and it looks like this bug was introduced in #3162640: Support translation of translatable fields with untranslatable target types β†’ . Reverting the commit on 8.x-1.12 fixes the issue.

Steps to reproduce

  1. Install site with standard profile
  2. Install paragraphs module
  3. Install tmgmt, tmgmt_content, tmgmt_file
  4. Enable Auto import in the File exchange provider
  5. Create a new paragraphs type (e.g. Text)
  6. Add a text field to the paragraph type
  7. Add a paragraphs field to the the basic_page content type that can reference the Text paragraph
  8. Configure a second language to the site (Swedish)
  9. Configure the basic_page and paragraph to be translatable (paragraph field on the basic_page is left untranslatable)
  10. Create a new node of type basic_page, add a Text paragraph to it and publish it
  11. Create and submit a new translation job with the File exchange provider and translate the basic_page to Swedish
  12. Download the XLIFF export and update the target fields with something to differentiate the translation (e.g. "Translation 1")
  13. Upload the "translated" XLIFF file in on the Jobs view and import it
  14. Check the translated page - the Swedish translation should be imported as expected
  15. Do step 10-12 again but update the XLIFF export with something new (e.g. "Translation 2").
  16. Inspect the Swedish translation again.

You expect the new translation ("Translation 2") to be available on the paragraph. Instead the initial translation ("Translation 1") is there.

Proposed resolution

Find what causes the issue and fix it. Do we add a new test for this? I'll continue investigating today and next week and try to do a merge request if I find something.

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Source: Entity

Created by

πŸ‡ΈπŸ‡ͺSweden marcusml

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024