Import of node with translated paragraphs fails

Created on 28 December 2023, 6 months ago

Problem/Motivation

This might be a duplicate of πŸ› Don't add translation, if exist Postponed or #2947197: Import of translated paragraph entities fails silently β†’ other similar issues but I couldn't find enough details there to make sure.

When I'm importing a node with translations which has paragraph fields also translated, the process crashes with:

Drupal\Core\Entity\EntityStorageException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'ff25eaa7-1d43-4a9a-9bf0-176855d78646' for key 'paragraph_field__uuid__value': INSERT INTO "paragraphs_item" ("revision_id", "type", "uuid", "langcode") VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3); Array
 (
     [:db_insert_placeholder_0] => 
     [:db_insert_placeholder_1] => paragraph_type
     [:db_insert_placeholder_2] => ff25eaa7-1d43-4a9a-9bf0-176855d78646
     [:db_insert_placeholder_3] => en
 )
 

My case is about paragraphs as referred entities but I have a feeling that it might happen to other referred translated entities too.

Steps to reproduce

See the "test only" version of MR: #2 πŸ› Import of node with translated paragraphs fails Active

Proposed resolution

Fix it.

Remaining tasks

None.

User interface changes

None.

API changes

None.

Data model changes

A correct structure of the normalized entity.

πŸ› Bug report
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡·πŸ‡΄Romania claudiu.cristea Arad πŸ‡·πŸ‡΄

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

Merge Requests

Comments & Activities

Production build 0.69.0 2024