Uncaught TypeError: $.trim is not a function

Created on 22 July 2025, 11 days ago

Problem/Motivation

jQuery.trim() is deprecated in jQuery 3.5 and has been removed from jQuery 4. matomo.admin.js still uses jQuery.trim().

Steps to reproduce

  • In Drupal 11.2
  • Access /admin/config/system/matomo
  • Open "Tracking scope" vertical tab "Roles"
  • Check any role
  • See JavaScript error in console
    Uncaught TypeError: $.trim is not a function

Proposed resolution

Use text.trim() instead of $.trim(text).

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇩🇪Germany hosterholz

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

Comments & Activities

Production build 0.71.5 2024