In js/jquery.treetable.js the following JQuery functions are used that are no longer supported in JQuery 4 which is rumored to be part of D11.
- IsNumeric - https://git.drupalcode.org/project/token/-/blob/8.x-1.x/js/jquery.treeta...
- trim - https://git.drupalcode.org/project/token/-/blob/8.x-1.x/js/jquery.treeta...
Hoping this can be addressed before it becomes an issue.
Thank you
Madhu
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | token-jquery-treetable-jquery4-compatibility-3554137-2.patch | 2.11 KB | thatguy |
Issue fork token-3554137
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 #2
thatguy commentedI know patch files are not recommended anymore but here is one for anyone who needs the fix quickly. I have to look into using the issue forks...
Comment #3
gueguerreiroDrupal 11 ships with jQuery 4, which means those functions are indeed removed and no longer working: https://www.drupal.org/node/3445202 and https://blog.jquery.com/2024/02/06/jquery-4-0-0-beta/.
However, I see that your patch is also replacing instance of inArray, as far as I can see that one is OK to use? https://api.jquery.com/jQuery.inArray/. It's isArray that has been deprecated instead. Is there a reason why we are also replacing this?
Full disclosure I'm not a JS person :p Setting to Needs Review to see if those changes are within scope. But the changes to trim and isNumeric are indeed necessary.