Problem/Motivation
Bumping required core version to 10.x gives a lot of JS errors related to once and each functions, after this patch module should be compatible with 10.x.
Steps to reproduce
Install module on Drupal 10.x
Proposed resolution
Migrate JS API calls to newer version.
Remaining tasks
- ✅ File an issue about this project
- ✅ Addition/Change/Update/Fix to this project
- ✅ Testing to ensure no regression
- ✅ Automated unit/functional testing coverage
- ➖ Developer Documentation support on feature change/addition
- ➖ User Guide Documentation support on feature change/addition
- ✅ Code review from Bootstrap Styles team member
- ✅ Full testing and approval
- ✅ Credit contributors
- ✅ Review with the product owner
- ✅ Release bootstrap_styles-1.1.1
User interface changes
- N/A
API changes
- N/A
Data model changes
- N/A
Release notes snippet
- Issue #3330458: Fixed Drupal 10 Change of JS
jquery/onceto drupalcore/once, migrate JS API
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | bootstrap_styles-3330458-8.patch | 13.25 KB | jmaerckaert |
| #2 | js_once_each_1.patch | 16.09 KB | prauat |
| js_once_each.patch | 11.31 KB | prauat |
Comments
Comment #2
prauatPatch with fixed on('click')
Comment #3
rajab natshahComment #4
smustgrave commentedSo bootstrap layout builder has instances of once too that will need to be replaced to test this.
Think this could be a critical almost as currently bootstrap layout builder does not work in Drupal 10
Comment #5
prauat@smustgrave Can you tick this as reviewed?
Comment #6
smustgrave commentedTested as part of the fix for layout builder and this resolves the deprecated once() calls
Comment #7
rajab natshahThank you, Paul, for patch #2 .
Comment #8
jmaerckaert commentedReroll for the version 1.1.0.
Comment #9
rajab natshahThanks, Jonathan for the #8 patch
Comment #10
perarg commentedpatch#8 works great at D10. I think it can proceed to RTBC
Comment #11
Sonam goswami52 commentedComment #12
Sonam goswami52 commentedPatch #8 applied successfully on drupal 10 and its working fine for me.
Thank you
Comment #13
rajab natshahComment #14
david-b commentedPatch #8 working good for me. All errors with "once" are fixed.
Comment #15
dalemoore commentedI can't get any of these patches for Bootstrap Styles and Bootstrap Layout Builder to apply in Drupal 10 and the module is just broken. Have they been tested with D10 10.0.9?
Comment #16
prauatHi @dalemoore against which version you've been trying to apply patch?
Comment #17
dalemoore commentedHi @prauat, I'm on D10.0.9 and Bootstrap Styles 1.1.0 and Bootstrap Layout Builder 2.1.1. The issue is highly likely to be PEBKAC, but I can't figure out what the issue is. Having the "Fix not loading bootstrap_styles/aos.local or bootstrap_styles/aos.remote library" along with "[Drupal 10] Change of JS jquery/once to drupal core/once, migrate JS API." and "Fix Module does not work in D10" issues, at the least.
In my composer.json:
Comment #20
rajab natshahComment #21
rajab natshahComment #22
rajab natshah✅ Released bootstrap_styles-1.1.1
Comment #23
rajab natshahComment #24
podarokComment #26
david-b commented