Problem/Motivation

Bootstrap's JS checks for JQuery version and throws 'Uncaught Error: Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0' error on Drupal 11.

Steps to reproduce

Install this theme on Drupal 11, open console log.

Proposed resolution

- Boostrap4 doesn't have any incompatibles with JQuery4 (apply JQuery4 to Bootstrap, test again)
- Bump dist Bootstrap4 util.js (https://git.drupalcode.org/project/bootstrap4/-/blob/3.0.x/dist/bootstra...) to v5

also see how Bootsrap3 did compatibility with JQuery4: https://github.com/entreprise7pro/bootstrap/blame/c143184fd5fc059bc464b8...

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#4 tests.png64.66 KBjannakha

Issue fork bootstrap4-3549897

Command icon 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

jannakha created an issue. See original summary.

jannakha’s picture

Issue summary: View changes

jannakha’s picture

Status: Active » Needs review
StatusFileSize
new64.66 KB

updated requirement to jquery 4
updated/run tests with new jquery - all tests pass (see screenshot)

please review/release

jannakha’s picture

also added code these fixes:
#3410040: Schema is missing for few parameters feat: Schema is missing for few parameters
#3498189: Use minified js bundle in libraries.yml feat: Use minified js bundle in libraries.yml

vladimiraus’s picture

Status: Needs review » Reviewed & tested by the community

Looks good. Thank you for your contribution. 🧁
Tested with no errrors.

lance lancelot’s picture

Is there currently any patch or supported workaround for drupal/bootstrap4:^3.0 to make it compatible with Drupal 11 (jQuery 4)?

We are running Drupal 11 and encounter the jQuery version constraint error from Bootstrap 4 JS. The dev branch seems to address this partially, but there is no stable release or documented patch yet.

Is an official patch or release planned, or is Bootstrap 4 considered incompatible with Drupal 11 going forward?

vladimiraus’s picture

Status: Reviewed & tested by the community » Fixed

Thank you. Committed. 🍻

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

  • vladimiraus committed 35079df9 on 3.0.x
    feat: #3549897 Add compatibility with JQuery 4 for Drupal 11
    
    By:...
dadderley’s picture

Very nice.

I have a ddev site running Drupal 11 and Bootstrap 4.

I just noticed that this issue has been resolved.

I updated ddev site to Drupal 11.3.2 and Bootstrap 4 to 3.0.7.

To my great delight, the dropdown nav now works. It did not work prior to the upgrade.

Thanks for fixing this.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.