- Issue created by @paulkittredge
- 🇧🇪Belgium f0ns
I have the same issues in a Drupal 11 environment using the Views Load More module with the following error:
An error occurred during the execution of the Ajax response: TypeError: $.trim is not a function"
Your reasoning on where this error comes from seems accurate.
- 🇧🇪Belgium f0ns
I created a patch with replaces $.trim with .trim based on the JQuery documentation:
Note: This API has been deprecated in jQuery 3.5; please use the native String.prototype.trim method instead. Unlike jQuery.trim, String.prototype.trim does not work with types other than strings (null, undefined, Number). Make sure that your code is compatible when migrating.
Source: https://api.jquery.com/jQuery.trim/#:~:text=Note%3A%20This%20API%20has%2....
- Status changed to RTBC
2 months ago 1:04pm 5 March 2025 - 🇧🇪Belgium flyke
Can confirm the bug in views_load_more 2.0.0 in Drupal 11.1.3 and can also confirm that patch #3 fixes it.
- 🇮🇳India chandraveer singh
I tested the patch, but it didn't worked for me, changing the status of the issue to "Needs work" and "Working on it".
- Merge request !19Issue #3496870: Issue with Ajax functionality and Drupal 11 → (Open) created by chandraveer singh
- 🇧🇪Belgium f0ns
That is weird, I just tested my initial patch and the MR and both apply correctly and fix the issue.