Issue with duplicate paragraph and data in the database

Created on 17 July 2023, over 1 year ago
Updated 12 December 2023, about 1 year ago

Problem/Motivation

There are currently 2 ways this module can be used when using nested Paragraphs

  1. Making the paragraphs field translatable on the top level (f.e. node), and making sure the paragraphs and its fields not translatable
  2. The same setup, but making Paragraphs translatable an also making it's fields that contain async values translatable

In scenario 1, we have a clean database, only containing paragraphs for the languages we have.
In scenario 2, we have a duplicate paragraph as soon as we start translating, and we get a lot of additional duplicate data in the content field tables, sometimes a duplicate for each language that exists. As soon as you also make paragraphs translatable, there is no way back in reverting this, as it creates additional table columns as content_translation_source, content_translation_outdated and content_translation_changed inside paragraphs_item_field_data. And this are actually also the cause of the duplicates.

Scenario 2 seems to be the most recommended one, as the ticket https://www.drupal.org/project/paragraphs_asymmetric_translation_widgets... is focussing on the migration path for this scenario. But is however creates duplicate data and pollutes the database.

Steps to reproduce

  • Create a node with a paragraphs asym field
  • Create a paragraph that has a nested paragraph, f.e. an accordion list, containing a paragraph for accordion items.
  • Inside the accordion item, allow to nest different paragraphs, like a paragraph with a text field, or a cta field or something else.
  • Make all paragraphs fields translatable in async
  • Translate content and look inside the tables paragraphs_item_field_data and the tables that contain the content of the text field.

Proposed resolution

Think about implementing scenario 1 as the default. Or find a solution to avoid duplicates in scenario 2.

🌱 Plan
Status

Active

Version

1.0

Component

Code

Created by

🇧🇪Belgium hoebekewim

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

Comments & Activities

Production build 0.71.5 2024