Javascript warning from content language and translation page

Created on 22 January 2024, 11 months ago
Updated 27 March 2024, 9 months ago

Problem/Motivation

On the content language and translation page, you can get multiple, repeated JavaScript errors that start with:

Uncaught TypeError: Cannot read properties of undefined (reading 'matches')...

This seems to be related to code that handles "columns" on this particular page. I haven't seen the columns in question. They may only show up when certain modules are added and/or enabled, or it may be something that is being implemented in Drupal 11.

This issue was introduced in πŸ“Œ Refactor (if feasible) use of jquery is function to use vanillaJS Fixed
and a similar issue is being worked on in πŸ› contentTranslationDependentOptions behavior doesn't check if found element array is empty RTBC

Steps to reproduce

  1. Enable the content translation module on a site with a few content types, taxonomies, etc.
  2. Navigate to the content language and translation page (/admin/config/regional/content-language)

Proposed resolution

We just need to check if the variable is not empty before trying to run the regex on it.

Merge request link

https://git.drupalcode.org/project/drupal/-/merge_requests/6276

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

πŸ› Bug report
Status

Fixed

Version

10.2 ✨

Component
Content translationΒ  β†’

Last updated 2 days ago

No maintainer
Created by

πŸ‡ΊπŸ‡ΈUnited States RoloDMonkey

Live updates comments and jobs are added and updated live.
  • JavaScript

    Affects the content, performance, or handling of Javascript.

Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024