Correct paragraph translation when viewing but not when editing

Created on 28 August 2024, 3 months ago

Problem/Motivation

I have two very odd issues with translated content, very likely related, occurring in D10.3.1 that was not present in D9.

The default language is English.
There is an example piece of content that is has a paragraph (an alert) field.
There are additional 3 languages into which the paragraph field has been translated.

When viewing the page (node) content in each language, the alert appears in the same language.

When editing the page, and then the paragraph within the page, the text is always presented in English, no matter the node language currently being edited.

At the start I assumed based on the content structure that the text was coming from a paragraph, despite being unable to locate it via the admin UI. Following is the db output of the salient tables:

Paragraph field records

MariaDB [db]> select * from paragraph__field_description where field_description_value like "%oficina de control%";

| bundle | deleted | entity_id | revision_id | langcode | delta | field_descrip                                                         tion_value | field_description_format |

| alert  |       0 |      4576 |      467071 | en       |     0 | <p>Office of Transactions.&nbsp;<a href="/Transactions-alert" rel=" noopener" target="_blank" title=“Office of Transactions.”>Read more</a>&nbsp;</p>

| alert  |       0 |      4576 |      467071 | es       |     0 | <p>Oficina de                                                          Activos — Transacciones&nbsp;<a href="/es/Transactions-alert" rel=" noopener" target="_blank" title=“Office of Transactions.”>Lee mas</a>&nbsp;</p                                                         >
     | full_html                |

Node field record

MariaDB [db]> select * from node__field_alert where field_alert_target_id="4576;

| bundle              | deleted | entity_id | revision_id | langcode | delta |                                                          field_alert_target_id | field_alert_target_revision_id |

| transaction_segments |       0 |        61 |      159566 | en       |     1 |                                                                           4576 |                         467071 |

Node record

MariaDB [db]> select * from node where nid=61;

| nid | vid    | type                | uuid                                 | langcode |

|  61 | 159566 | t1_banking_segments | 29c80695-c997-46d4-8a7e-61b85849777b | en       |

Node field data record 

MariaDB [db]> select * from node_field_data where nid=61;

| nid | vid    | type                | langcode | status | title           | uid | created    | changed    | promote | sticky | default_langcode | revision_translation_affected | content_translation_source | content_translation_outdated |

|  61 | 159566 | t1_banking_segments | en       |      1 | Business        |   1 | 1558424304 | 1704224588 |       1 |      0 |                1 |                             1 | und                        |                            0 |
|  61 | 159566 | t1_banking_segments | es       |      1 | Banca Comercial | 221 | 1570209889 | 1669921907 |       1 |      0 |                0 |                          NULL | en                         |                            0 |

I believe this shows that the data all appears correct. It is being used properly when rendering the original content.

The second issue is that when adding a new paragraph of the same type to the existing source node, English, saving, then editing the Spanish node and translating the paragraph content:
All language versions of the page are presented with Spanish paragraph text
All language versions when edited show Spanish as the paragraph text
If the English version is then edited and changed back to English:
All language versions of the page are presented with English paragraph text
All language versions when edited show English as the paragraph text

What is causing this, and how do I go about fixing it?

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

1.15

Component

Code

Created by

🇺🇸United States j. ayen green

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

Comments & Activities

Production build 0.71.5 2024