Problem/Motivation
Drupal 11.4 ships jQuery 4, which removed jQuery.trim(). js/module_filter.modules.js still calls it twice, at the lines that build the requiredBy and requires lists, so the Extend page throws a TypeError on Drupal 11.4.
The 4.x, 5.x and 6.0.x branches all still call it.
Steps to reproduce
- Install Module Filter 5.0.5 on Drupal 11.4.
- Visit
/admin/modules.
- Open the browser console.
Proposed resolution
Replace both calls with the same null-safe trim that jQuery.trim() performed.
- item.requiredBy.push($.trim(moduleName));
+ item.requiredBy.push((moduleName == null ? '' : String(moduleName).trim()));
Confirmed on Drupal 11.4.5 with jQuery 4.0.0.
Remaining tasks
Review the patch.
User interface changes
None.
API changes
None.
Data model changes
None.
Comments