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
Issue fork bootstrap4-3549897
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
Comment #2
jannakha commentedComment #4
jannakha commentedupdated requirement to jquery 4
updated/run tests with new jquery - all tests pass (see screenshot)
please review/release
Comment #5
jannakha commentedalso 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
Comment #6
vladimirausLooks good. Thank you for your contribution. 🧁
Tested with no errrors.
Comment #7
lance lancelot commentedIs 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?
Comment #8
vladimirausThank you. Committed. 🍻
Comment #11
dadderley commentedVery 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.