Module jQuery library conflicts with site jQuery library

Created on 20 January 2023, almost 2 years ago
Updated 17 July 2023, over 1 year ago

Problem/Motivation

The modules uses an external jQuery library which conflicts with the existing one.

Proposed resolution

Remove the external library. Use the one existing.

🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

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.

  • Attaching a possible patch.

    @leontin I had the same error mentioned above, I applied the patch but got the following error (slide show gets slightly further, but still crashes):

    Uncaught TypeError: e.indexOf is not a function
        load js_y57geBL-K47QfSLZFcl_jtxJKKl-i8yIkHt048E1tQc.js:2
        d jQuery
        each js_y57geBL-K47QfSLZFcl_jtxJKKl-i8yIkHt048E1tQc.js:2
        each js_y57geBL-K47QfSLZFcl_jtxJKKl-i8yIkHt048E1tQc.js:2
        d jQuery
        each js_y57geBL-K47QfSLZFcl_jtxJKKl-i8yIkHt048E1tQc.js:2
        each js_y57geBL-K47QfSLZFcl_jtxJKKl-i8yIkHt048E1tQc.js:2
        jQuery 3
        each js_y57geBL-K47QfSLZFcl_jtxJKKl-i8yIkHt048E1tQc.js:2
        each js_y57geBL-K47QfSLZFcl_jtxJKKl-i8yIkHt048E1tQc.js:2
        jQuery 3
        e js_y57geBL-K47QfSLZFcl_jtxJKKl-i8yIkHt048E1tQc.js:2
        t js_y57geBL-K47QfSLZFcl_jtxJKKl-i8yIkHt048E1tQc.js:2
        setTimeout handler*Deferred/then/l/< js_y57geBL-K47QfSLZFcl_jtxJKKl-i8yIkHt048E1tQc.js:2
        c js_y57geBL-K47QfSLZFcl_jtxJKKl-i8yIkHt048E1tQc.js:2
        fireWith js_y57geBL-K47QfSLZFcl_jtxJKKl-i8yIkHt048E1tQc.js:2
        fire js_y57geBL-K47QfSLZFcl_jtxJKKl-i8yIkHt048E1tQc.js:2
        c js_y57geBL-K47QfSLZFcl_jtxJKKl-i8yIkHt048E1tQc.js:2
        fireWith js_y57geBL-K47QfSLZFcl_jtxJKKl-i8yIkHt048E1tQc.js:2
        ready js_y57geBL-K47QfSLZFcl_jtxJKKl-i8yIkHt048E1tQc.js:2
        $ js_y57geBL-K47QfSLZFcl_jtxJKKl-i8yIkHt048E1tQc.js:2
        EventListener.handleEvent* js_y57geBL-K47QfSLZFcl_jtxJKKl-i8yIkHt048E1tQc.js:2
        <anonymous> js_y57geBL-K47QfSLZFcl_jtxJKKl-i8yIkHt048E1tQc.js:2
        <anonymous> js_y57geBL-K47QfSLZFcl_jtxJKKl-i8yIkHt048E1tQc.js:2
    js_y57geBL-K47QfSLZFcl_jtxJKKl-i8yIkHt048E1tQc.js:2:85359
        load js_y57geBL-K47QfSLZFcl_jtxJKKl-i8yIkHt048E1tQc.js:2
        d jQuery
        each js_y57geBL-K47QfSLZFcl_jtxJKKl-i8yIkHt048E1tQc.js:2
        each js_y57geBL-K47QfSLZFcl_jtxJKKl-i8yIkHt048E1tQc.js:2
        d jQuery
        each js_y57geBL-K47QfSLZFcl_jtxJKKl-i8yIkHt048E1tQc.js:2
        each js_y57geBL-K47QfSLZFcl_jtxJKKl-i8yIkHt048E1tQc.js:2
        jQuery 3
        each js_y57geBL-K47QfSLZFcl_jtxJKKl-i8yIkHt048E1tQc.js:2
        each js_y57geBL-K47QfSLZFcl_jtxJKKl-i8yIkHt048E1tQc.js:2
        jQuery 3
        e js_y57geBL-K47QfSLZFcl_jtxJKKl-i8yIkHt048E1tQc.js:2
        t js_y57geBL-K47QfSLZFcl_jtxJKKl-i8yIkHt048E1tQc.js:2
        (Async: setTimeout handler)
        l js_y57geBL-K47QfSLZFcl_jtxJKKl-i8yIkHt048E1tQc.js:2
        c js_y57geBL-K47QfSLZFcl_jtxJKKl-i8yIkHt048E1tQc.js:2

    Every other pageload changes the behavior. If I reload the page I'll get a "working slideshow" that skips the images very fast. If I reload, I get the error in the console (and so on between reloads0.

  • More details:

    After applying patch a ctrl+shift+r (in firefox) or loading the page with a private browser will yield a: "Uncaught TypeError: e.indexOf is not a function"

    If I press ctrl+r to reload the page, the sideshow does load... But seems to be loaded in an incorrect state (no settings, cant click).

  • Assigned to heykarthikwithu
  • Status changed to Needs review over 1 year ago
  • Open on Drupal.org →
    Core: 9.5.5 + Environment: PHP 7.4 & MySQL 5.7
    last update over 1 year ago
    Waiting for branch to pass
    • leontin authored 3b43ed54 on 2.x
      Issue #3335154 by leontin, lizzzas, heykarthikwithu: Module jQuery...
  • Issue was unassigned.
  • Status changed to Fixed over 1 year ago
  • 🇮🇳India heykarthikwithu Bengaluru 🌍

    Thanks @leontin for the patch.
    Now in the 2.x branch module will be using "core/jquery" instead of using the jquery library from the external url.

    Thanks @lizzzas for the review,
    I have tested the patch and the issue which had faced should be because of the cache or module configurations, If you clear the caches the the slideshow would work as expected.

    Current status

    1. Merged the patch to the 2.x branch.
    2. This code will be released in the next version of module release.
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024