Wrong render of HTML from label when field is shared across languages in error message

Created on 2 August 2017, over 7 years ago
Updated 6 September 2024, 3 months ago

When setting up an entity bundle to be translatable, people have a choice of making each field translatable or not.

When a node gets an error for example because you try to save a node with required fields.
The label name is used in the error message as "@name is required".

Because content translation is putting (all languages) after the label this is also appearing in the error message.
So the error will be: "Field 1 (all languages) field is required." But the current message is "Field 1 (all languages) field is required."

Problem: HTML is not rendered well in the error message.

🐛 Bug report
Status

Needs work

Version

11.0 🔥

Component
Content translation 

Last updated 3 days ago

No maintainer
Created by

🇳🇱Netherlands Martijn de Wit 🇳🇱 The Netherlands

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

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.

  • First commit to issue fork.
  • 🇬🇧United Kingdom jonathan1055

    Fixed issue summary to correctly show the < and >

  • 🇮🇳India KumudB Ahmedabad

    It appears that this issue has been resolved in the latest version of Drupal 11. I have tested the scenario and verified that the error message no longer includes the "(all languages)" suffix.

    I have attached a screenshot for reference. Given that the problem is no longer present, I believe we can close this issue.

    Thank you!

  • 🇬🇧United Kingdom pobster

    Not everyone is on 11.x yet... This is rerolled for 10.3.x.

Production build 0.71.5 2024