Problem/Motivation
The Tablesorter jQuery plugin is broken in Drupal 11 / jQuery 4. It produces an error in the console: TypeError: $.trim is not a function. (In '$.trim( val )', '$.trim' is undefined). This trim function has been removed in jQuery 4. The error makes it no longer possible to sort items in a sitemap by clicking a column header.
Steps to reproduce
On Drupal 11, install this module and create a sitemap. Ensure "Include a stylesheet in the sitemaps for humans." is enabled for the sitemap, and visit it in the browser. You'll see an error in the console and clicking the column headers does nothing.
Proposed resolution
It doesn't appear Tablesorter is actively maintained, so either choose a different method for sorting the table or modify Tablesort to remove this missing function.
Remaining tasks
Either
- An update to the current jQuery implementation
OR
- Replace jQuery Tablesorter with vanilla JavaScript
User interface changes
NaN
API changes
NaN
Data model changes
NaN
Issue fork xmlsitemap-3562043
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
mregnault commentedI created a MR to replace the jQuery with vanilla JS. It's based on the work that was done in the similar issue that was created for the simple_sitemap module.