Drupal 11 and jQuery 4 compatibility question

Created on 29 July 2024, 6 months ago

Problem/Motivation

Hello. As we all know, Drupal 11 will be released soon. Thing is, D11 has switched to jQuery JavaScript Library v4.0.0-beta. And the latter is not supported by Bootstrap v3.4.1.
Using jQuery v4.0.0-beta with latest stable release of this theme some things just stop working and browser console explicitly states that jQuery v4 is not supported.

Question

What is the best workaround for this? For now I can think of specifying jQuery v3.7.1 in libraries.yml file as an easy hack:

customjquery:
  header: true
  remote: https://github.com/jquery/jquery
  version: "3.7.1"
  license:
    name: MIT
    url: https://github.com/jquery/jquery/blob/3.7.1/LICENSE.txt
    gpl-compatible: true
  js:
    js/jquery.min.js: { preprocess: false, minified: true }

However, I am not sure if other components of Drupal Core will work without any issues if the Core relies on jQuery v4.0.0.
Or is there any possibility that this project (drupal/bootstrap) will get some compatibility patch to make Bootstrap v3.4.1 compatible to jQuery 4.0.0?

I apologize for noobish questions and thanks for your time.

Feature request
Status

Active

Version

3.31

Component

Code

Created by

🇷🇺Russia pick_d

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

Comments & Activities

Production build 0.71.5 2024