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/once to drupal core/once, migrate JS API

Comments

prauat created an issue. See original summary.

prauat’s picture

StatusFileSize
new16.09 KB

Patch with fixed on('click')

rajab natshah’s picture

smustgrave’s picture

So 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

prauat’s picture

@smustgrave Can you tick this as reviewed?

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Tested as part of the fix for layout builder and this resolves the deprecated once() calls

rajab natshah’s picture

Assigned: prauat » Unassigned

Thank you, Paul, for patch #2 .

jmaerckaert’s picture

Version: 2.0.x-dev » 1.1.0
Status: Reviewed & tested by the community » Needs review
StatusFileSize
new13.25 KB

Reroll for the version 1.1.0.

rajab natshah’s picture

Thanks, Jonathan for the #8 patch

perarg’s picture

patch#8 works great at D10. I think it can proceed to RTBC

Sonam goswami52’s picture

Assigned: Unassigned » Sonam goswami52
Sonam goswami52’s picture

Assigned: Sonam goswami52 » Unassigned

Patch #8 applied successfully on drupal 10 and its working fine for me.
Thank you

rajab natshah’s picture

Status: Needs review » Reviewed & tested by the community
david-b’s picture

Patch #8 working good for me. All errors with "once" are fixed.

dalemoore’s picture

I 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?

prauat’s picture

Hi @dalemoore against which version you've been trying to apply patch?

dalemoore’s picture

Hi @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:

"patches": {
  "drupal/bootstrap_styles": {
    "3315218: Fix not loading bootstrap_styles/aos.local or bootstrap_styles/aos.remote library.": "https://www.drupal.org/files/issues/2023-01-25/3315218-17--1-0-x.patch",
    "3330458: [Drupal 10] Change of JS jquery/once to drupal core/once, migrate JS API.": "https://www.drupal.org/files/issues/2023-03-07/bootstrap_styles-3330458-8.patch"
  },
  "drupal/bootstrap_layout_builder": {
    "3335356: Fix Module does not work in D10": "https://www.drupal.org/files/issues/2023-01-25/issue_3335356_drupal10.patch"
  }
},

  • Rajab Natshah committed ba29fd77 on 2.0.x authored by prauat
    Issue #3330458 by prauat, jmaerckaert: [Drupal 10] Change of JS jquery/...
rajab natshah’s picture

Status: Reviewed & tested by the community » Fixed
rajab natshah’s picture

Issue tags: +bootstrap_styles-1.1.0
rajab natshah’s picture

Title: [Drupal 10] Change of JS jquery/once to drupal core/once, migrate JS API » Fix Drupal 10 Change of JS jquery/once to Drupal core/once, migrate JS API
rajab natshah’s picture

Issue summary: View changes
podarok’s picture

Version: 1.1.0 » 1.1.1

Status: Fixed » Closed (fixed)

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

david-b’s picture