Regression > Patch for "webform entity reference formatters not supporting translations" in 6.2.0-beta7 breaks Webform embeds within untranslated entities

Created on 26 October 2023, about 1 year ago

Problem/Motivation

We found an edge-case while upgrading to Drupal 10 / Webform 6.2 in which Webforms embedded within Nodes via the Webform Entity Reference functionality are broken if the encasing Node entity itself is not translated.

After some incremental upgrading within Drupal 9 from beta1 to beta7, we found our forms worked as expected up until beta6 and stopped in beta7. Ultimately, we discovered rolling back the patch in πŸ› webform entity reference formatters do not support translations Needs review in version 6.2.0-rc3 resolved our issue. This rollback resolved the bug, which was present in both Drupal 9 and Drupal 10.

Steps to reproduce

We can try and get full reproduction steps in Unami if desired. I will describe our situation.

  • Have a Webform, which is translated via configuration translation.
  • Have a Basic Page node type with a few fields and a Webform Entity Reference field. The Entity Reference field is used to pass other node field data to the Webform as default values (via the token module).
  • Have two languages.
  • Create a node but do NOT translate it.
  • The form embedded in the node is fully present and functioning in the default language.
  • Switch to the second language. The page renders as expected, but the embedded form shows a submit button but no other fields.
  • If you now translate the node, the form is present and functioning in all languages.

Proposed resolution

We have gotten as far as rolling back the patch (which we attached for others facing this issue). We quickly tried to fix the bug in the patch, but we were not fully certain what the patch was set to achieve and had to move on.

πŸ› Bug report
Status

Fixed

Version

6.2

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States kmonty San Francisco, CA

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

Comments & Activities

Production build 0.71.5 2024