Dependencies of jQuery UI are being deprecated in core (*). When this happens, it may affect any site that depends on the jQuery UI Bridge feature of Bootstrap theme.
jQuery UI Bridge in Bootstrap is broken with Drupal 9.2.0 out, due to changes in the way the libraries in core are defined.
Is it possible to provide a version of Bootstrap theme that directly depends on jQuery libraries that are provided by contrib projects https://www.drupal.org/project/jquery_ui
(*) references:
- Drupal core issue: #3052002: [meta] Replace JQuery with vanilla Javascript in core
- Drupal core issue: #3113400: Deprecate more jQuery UI library definitions
- Change record: jQuery UI library definitions have been deprecated
- Change record: Most jQuery UI asset libraries are deprecated and moved to contrib modules
Comment | File | Size | Author |
---|---|---|---|
#17 | 3219852-17.patch | 1.15 KB | jhedstrom |
Issue fork bootstrap-3219852
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
markus_petrux CreditAttribution: markus_petrux commentedComment #3
markus_petrux CreditAttribution: markus_petrux commentedComment #4
markus_petrux CreditAttribution: markus_petrux commentedWell, I've been able to fix this from the subtheme, by removing the jquery.ui assets defined by core with the drupal.dialog libray in 9.2.x
Maybe this could be done in \Drupal\bootstrap\Plugin\Alter\LibraryInfo::alter() with a patch here? ...though, in the end, something else will be needed when more changes are introduced in core as part of the core issue mentioned in the IS.
Comment #5
markus_petrux CreditAttribution: markus_petrux commentedComment #6
markus_petrux CreditAttribution: markus_petrux commentedNested modals in BS3 are not supported, but maybe... possible once the following core issue lands #2741877: Nested modals don't work: opening a modal from a modal closes the original ?
Comment #7
bsuttis CreditAttribution: bsuttis commentedThank you for posting the code above, I can confirm it restored the Bootstrap modals on my 9.2.0 project.
Comment #8
rmpereira CreditAttribution: rmpereira as a volunteer and commentedSame since the 9.2.0 Drupal version, I can confirm too that the code #4 works.
In addition, the issue/patch at the origin of the problem : https://www.drupal.org/project/drupal/issues/3113400
Comment #9
markus_petrux CreditAttribution: markus_petrux commentedThanks for the pointer, added to IS.
Comment #10
pguillard CreditAttribution: pguillard commentedComment #11
pjotr.savitski CreditAttribution: pjotr.savitski commentedI've been able to add the fix code directly into the bootstrap them hook, before the Bootstrap::alter. Shouldn't this code be included into the main theme code base for the 4.x release?
I did try to see if an Alter plugin could be used for that, but it seems that only bootstrap based themes are checked for providing those. I ended up adding a hook handler to the module itself. The code is mostly the same, with just a check to see if bootstrap is present, bootstrap based theme is active, modal handler setting is set to TRUE and jquery_ui_bridge setting is also set to TRUE.
Comment #12
ericdsd CreditAttribution: ericdsd commentedThanks a lot Pjotr you saved me lot of time, #11 seems to work like a charm.
Comment #13
flocondetoilesnippet #11 did the trick
Comment #14
no74hThank you guys for providing the fix! I agree this should be included with bootstrap project.
Comment #17
jhedstromI added the logic from #11 to an MR. Also attaching a patch here for folks to use in composer.
Comment #18
Ivan616 CreditAttribution: Ivan616 at Websolutions Agency commentedI can confirm that patch from #11 resolved issues we had on a site after upgrading to Drupal 9.4.
We had server modals not opening trough bootstrap and now they all work again.
Thank you very much.
Comment #19
shelaneThis theme will not be supported for Bootstrap 4. See alternative themes for this support.
Comment #20
dinazaur CreditAttribution: dinazaur as a volunteer and at DevBranch commentedIt seems that you just closed the issue without even reading the context. Who even said something about Bootstrap 4?
Comment #21
shelaneThe MR is set against the 4.x branch and not the 3.x branch.