Status of checkboxes on content translation admin page having wrong status

Created on 25 January 2024, 5 months ago
Updated 26 February 2024, 4 months ago

Problem/Motivation

On a website, we use a translatable content type (CT), which in turn contains both translatable and non-translatable fields. Other content types are not translatable.
This is correctly reflected under /admin/config/regional/content-language, so that the checkbox is set on the translatable CT and its fields are expanded, while the fields of non-translatable CTs remain collapsed.
After an upgrade to 10.2.2, the checkbox on the translatable CT appears correctly set, but the checkboxes of the associated fields are collapsed, while those of non-translatable CTs appear collapsed. The behavior is therefore exactly the wrong way round.
If you now switch the checkbox of the translatable CT off and on again, the checkboxes of all fields of the CT are activated. However, this does not correspond to the saved configuration.

It seems to be a pure Javascript problem, because with deactivated JS the behavior is as expected.

In the brwoser console I get:

Uncaught TypeError: $element[0] is undefined
    check https://somedomain.de/core/modules/content_translation/content_translation.admin.js?v=10.2.2:64
    check https://somedomain.de//core/modules/content_translation/content_translation.admin.js?v=10.2.2:57
    attach https://somedomain.de/core/modules/content_translation/content_translation.admin.js?v=10.2.2:40
    attach https://somedomain.de/core/modules/content_translation/content_translation.admin.js?v=10.2.2:35
    attachBehaviors https://somedomain.de/core/misc/drupal.js?v=10.2.2:166
    attachBehaviors https://somedomain.de/core/misc/drupal.js?v=10.2.2:162
    insert https://somedomain.de/core/misc/ajax.js?v=10.2.2:1387
    jQuery 2
    insert https://somedomain.de/core/misc/ajax.js?v=10.2.2:1385
    commandExecutionQueue https://somedomain.de/core/misc/ajax.js?v=10.2.2:1046
content_translation.admin.js:64:13
🐛 Bug report
Status

Closed: duplicate

Version

11.0 🔥

Component
Content translation 

Last updated 8 days ago

No maintainer
Created by

🇩🇪Germany e5sego

Live updates comments and jobs are added and updated live.
  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

  • 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

Merge Requests

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.69.0 2024