$wrapper[method] is not a function

Created on 31 October 2022, about 2 years ago
Updated 16 August 2024, 4 months ago

I am using drupal 9 and i install last version of the module then i create a view page using views infinite scroll as pager and of course i enable ajax, but when i click on button pager i get this error bellow and check file attached:

ajax.js?v=9.4.8:550 Uncaught TypeError: $wrapper[method] is not a function at Drupal.AjaxCommands.insert

in my custom theme i include libraries jquery with drupal.ajax

any idea to fixe this error asap ??

πŸ› Bug report
Status

Active

Version

2.0

Component

User interface

Created by

πŸ‡²πŸ‡¦Morocco kamalMaroc

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States dnguyen2

    I'm having the same issue...

  • I have had the same issue on multiple sites on D10 - sites on D8 are not experiencing this.
    The issue only happens when logged in as Admin, when visiting the site as a regular user im able to load all the content from the load more button in the infinite view.

    using Views Infinite Scroll module 2.0.2
    I dont have any sites on 9 to test but assuming this is a D9 and up issue?

  • πŸ‡ΊπŸ‡¦Ukraine noteboy

    Just advice. Review your custom code. Can be case that you have overridden infinite-scroll.js in your theme and after upgrade that file was not updated and it causes an error

  • noteboy, thank you for the suggestion. I took a second look at this and found that the issue was that the custom theme on all the forementioned sites was loading an additional version of jquery as part of a library in theme.libraries.yml, I removed this and rewrote some of the custom javascript to use the version supplied by core.

Production build 0.71.5 2024