Entity reference translation breaks adding new parent entities in non-default languages

Created on 13 June 2016, over 8 years ago
Updated 2 August 2024, 4 months ago

Problem/Motivation

#2494959: Add translation integration added support for translating referenced entities along with their 'parents'. This works well, except that it breaks the IEF widget when a new 'parent' entity in a non-default language is created.

Steps to reproduce:

  1. Install Drupal 8 with IEF.
  2. Make sure there are two content types, both translatable. Their languages must be configurable in their forms.
  3. Add an entity reference field to one of the content types, targeting the other type.
  4. Configure the ER field to use the Complex IEF widget.
  5. Add a node of the type with the ER field. Change the language to anything else but the default language, and add a new entity reference value.
  6. Confirm that the form does not appear. No errors are shown or logged.

Proposed resolution

Make TranslationHelper::isTranslating() return FALSE if the entity the form state is for is new.

Remaining tasks

None.

User interface changes

None.

API changes

None.

Data model changes

None.

🐛 Bug report
Status

Needs review

Version

1.0

Component

Code

Created by

🇬🇧United Kingdom Xano Southampton

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