Automated Drupal 11 compatibility fixes for bootstrap

Created on 15 March 2024, 9 months ago

Problem/Motivation

Hello project maintainers,

This is an automated issue to help make this module compatible with Drupal 11.

Changes will periodically be added to this issue that remove deprecated API uses. To stop further changes from being posted, change the status to anything other than Active, Needs review, Needs work or Reviewed and tested by the community. Alternatively, you can remove the "ProjectUpdateBotD11" tag from the issue to stop the bot from posting updates.

The changes will be posted by the Project Update Bot → official user account. This account will not receive any issue credit contributions for itself or any company.

Proposed resolution

You have a few options for how to use this issue:

  1. Accept automated changes until this issue is closed

    If this issue is left open (status of Active, Needs review, Needs work or Reviewed and tested by the community) and the "ProjectUpdateBotD11" tag is left on this issue, new changes will be posted periodically if new deprecation fixes are needed.

    As the Drupal Rector project improves and is able to fix more deprecated API uses, the changes posted here will cover more of the deprecated API uses in the module.

    Patches and/or merge requests posted by others are ignored by the bot, and general human interactions in the issue do not stop the bot from posting updates, so feel free to use this issue to refine bot changes. The bot will still post new changes then if there is a change in the new generated patch compared to the changes that the bot posted last. Those changes are then up to humans to integrate.

  2. Leave open but stop new automated changes.

    If you want to use this issue as a starting point to remove deprecated API uses but then don't want new automated changes, remove the "ProjectUpdateBotD11" tag from the issue and use it like any other issue (the status does not matter then). If you want to receive automated changes again, add back the "ProjectUpdateBotD11" tag.

  3. Close it and don't use it

    If the maintainers of this project don't find this issue useful, they can close this issue (any status besides Active, Needs review, Needs work and Reviewed and tested by the community) and no more automated changes will be posted here.

    If the issue is reopened, then new automated changes will be posted.

    If you are using another issue(s) to work on Drupal 11 compatibility it would be very useful to other contributors to add those issues as "Related issues" when closing this issue.

Remaining tasks

Using the patches

  1. Apply the latest patch in the comments by Project Update Bot → or human contributors that made it better.
  2. Thoroughly test the patch. These patches are automatically generated so they haven't been tested manually or automatically.
  3. Provide feedback about how the testing went. If you can improve the patch, post an updated patch here.

Using the merge request

  1. Review the merge request and test it.
  2. Thoroughly test the changes. These changes are automatically generated so they haven't been tested manually or automatically.
  3. Provide feedback about how the testing went. If you can improve the merge request, create a new branch and merge request and work from there.

Warning: The 'project-update-bot-only' branch will always be overwritten. Do not work in that branch!

Providing feedback

If there are problems with one of the changes posted by the Project Update Bot → , such as it does not correctly replace a deprecation, you can file an issue in the Drupal Rector issue queue → . For other issues with the bot, for instance if the issue summary created by the bot is unclear, use the Project analysis issue queue → .

📌 Task
Status

Needs review

Version

3.30

Component

Code

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @project update bot
  • Open on Drupal.org →
    Core: 10.2.1 + Environment: PHP 8.1 & MySQL 5.7
    last update 9 months ago
    Waiting for branch to pass
  • This is an automated patch generated using Upgrade Status and Drupal Rector. Please see the issue summary for more details. A merge request is also openend and updated.

    It is important that any automated tests available are run and that you manually test the changes.

    Drupal 11 Compatibility

    According to the Upgrade Status module → , even with these changes, this module is not yet compatible with Drupal 11.

    Currently Drupal Rector, version 0.20.1, cannot fix all Drupal 11 compatibility problems.

    Therefore these changes did not update the info.yml file for Drupal 11 compatibility.

    Leaving this issue open, even after committing the current patch, will allow the Project Update Bot → to post additional Drupal 11 compatibility fixes as they become available in Drupal Rector.

    Debug info

    Bot run #11-120024

    This patch was created using these packages:

    1. drupal/upgrade_status: 4.1.0
    2. mglaman/phpstan-drupal: 1.2.7
    3. palantirnet/drupal-rector: 0.20.1
  • Open on Drupal.org →
    Core: 10.2.1 + Environment: PHP 8.1 & MySQL 5.7
    last update 9 months ago
    Waiting for branch to pass
  • Open on Drupal.org →
    Core: 10.2.1 + Environment: PHP 8.1 & MySQL 5.7
    last update 9 months ago
    Waiting for branch to pass
  • This comment was forced and has ignored the check if a change was already posted. This is only done when we want to update the issue without waiting for changes to happen.

    This is an automated patch generated using Upgrade Status and Drupal Rector. Please see the issue summary for more details. A merge request (MR) is also openend and updated.

    It is important that any automated tests available are run and that you manually test the changes.

    Drupal 11 Compatibility

    According to the Upgrade Status module → , even with these changes, this module is not yet compatible with Drupal 11.

    Currently Drupal Rector, version 0.20.1, cannot fix all Drupal 11 compatibility problems.

    Therefore, these changes did not update the info.yml file for Drupal 11 compatibility.

    The compatibility issues that Upgrade Status found after the Drupal Rector fixes were applied are attached to help you resolve them manually.

    Leaving this issue open, even after committing the current patch or merging the MR, will allow the Project Update Bot → to post additional Drupal 11 compatibility fixes as they become available in Drupal Rector.

    Debug information

    Bot run #11-137198

    These packages were used to generate the fixes:

    1. drupal/upgrade_status: 4.1.0
    2. mglaman/phpstan-drupal: 1.2.10
    3. palantirnet/drupal-rector: 0.20.1
  • Open on Drupal.org →
    Core: 10.2.1 + Environment: PHP 8.1 & MySQL 5.7
    last update 9 months ago
    Waiting for branch to pass
  • Open on Drupal.org →
    Core: 10.2.1 + Environment: PHP 8.1 & MySQL 5.7
    last update 7 months ago
    Waiting for branch to pass
  • This is an automated patch generated using Upgrade Status and Drupal Rector. Please see the issue summary for more details. A merge request (MR) is also openend and updated.

    It is important that any automated tests available are run and that you manually test the changes.

    Drupal 11 Compatibility

    According to the Upgrade Status module → , even with these changes, this module is not yet compatible with Drupal 11.

    Currently Drupal Rector, version 0.20.2, cannot fix all Drupal 11 compatibility problems.

    Therefore, these changes did not update the info.yml file for Drupal 11 compatibility.

    The compatibility issues that Upgrade Status found after the Drupal Rector fixes were applied are attached to help you resolve them manually.

    Leaving this issue open, even after committing the current patch or merging the MR, will allow the Project Update Bot → to post additional Drupal 11 compatibility fixes as they become available in Drupal Rector.

    Debug information

    Bot run #11-188138

    These packages were used to generate the fixes:

    1. drupal/upgrade_status: 4.3.2
    2. mglaman/phpstan-drupal: 1.2.11
    3. palantirnet/drupal-rector: 0.20.2
  • Open on Drupal.org →
    Core: 10.2.1 + Environment: PHP 8.1 & MySQL 5.7
    last update 7 months ago
    Waiting for branch to pass
  • This is an automated patch generated using Upgrade Status and Drupal Rector. Please see the issue summary for more details. A merge request (MR) is also openend and updated.

    It is important that any automated tests available are run and that you manually test the changes.

    Drupal 11 Compatibility

    According to the Upgrade Status module → , even with these changes, this module is not yet compatible with Drupal 11.

    Currently Drupal Rector, version 0.20.3, cannot fix all Drupal 11 compatibility problems.

    Therefore, these changes did not update the info.yml file for Drupal 11 compatibility.

    The compatibility issues that Upgrade Status found after the Drupal Rector fixes were applied are attached to help you resolve them manually.

    Leaving this issue open, even after committing the current patch or merging the MR, will allow the Project Update Bot → to post additional Drupal 11 compatibility fixes as they become available in Drupal Rector.

    Debug information

    Bot run #11-199781

    These packages were used to generate the fixes:

    1. drupal/upgrade_status: 4.3.2
    2. mglaman/phpstan-drupal: 1.2.11
    3. palantirnet/drupal-rector: 0.20.3
  • Pipeline finished with Success
    6 months ago
    Total: 179s
    #201290
  • Pipeline finished with Success
    6 months ago
    Total: 185s
    #201291
  • 🇵🇹Portugal jcnventura

    jcnventura → changed the visibility of the branch 3428283-automated-drupal-11 to hidden.

  • 🇵🇹Portugal jcnventura

    jcnventura → changed the visibility of the branch 3428283-automated-drupal-11 to hidden.

  • Pipeline finished with Success
    6 months ago
    #206294
  • Pipeline finished with Success
    6 months ago
    Total: 157s
    #206295
  • Pipeline finished with Success
    6 months ago
    Total: 181s
    #206299
  • Pipeline finished with Success
    6 months ago
    Total: 186s
    #206300
  • Status changed to Postponed 6 months ago
  • 🇵🇹Portugal jcnventura

    This makes the theme work under Drupal 11, but then comes the next problem:

    Error: Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4

    Drupal 11 has upgraded jQuery to 4.0.0-beta, and Bootstrap 3 doesn't support this version. This is effectively the end-of-line for Bootstrap 3, and if this theme doesn't find a way to support Bootstrap 5, then it is else the end-of-line for the theme.

  • 🇺🇸United States shelane

    This theme is not going to support Bootstrap 5. There are other themes that do.

  • 🇵🇹Portugal jcnventura

    Understood, and totally respect your decision. Everyone has now 2 years to migrate away from this theme, as it will be EoL at the same time as Drupal 10.

    Any tips on which of the existing Bootstrap 5 themes is the easiest to upgrade to?

  • 🇺🇸United States shelane

    Other themes are listed on the project page. We are currently working on getting our theme updated to use Radix as a base theme. Version 6 makes use of core SDC, which really works for us.

  • Status changed to Active 5 months ago
  • 🇨🇦Canada joseph.olstad

    reviewing

  • 🇨🇦Canada joseph.olstad

    It was mentioned in 2016 that Bootstrap 3 would not be compatible with jQuery 3, however it is currently compatible with jQuery 3.7.x.

    Let's keep this open to see what work comes out of this. Perhaps a fork to bootstrap 3.x js library will resolve this?

    Or, perhaps we can override D11 core for the front-end theme and force it to use jQuery 3 instead of 4?

    With that said, would prefer a version of bootstrap 3x compatible with jQuery 4 as that'd probably be the easier way to go.

  • 🇨🇦Canada joseph.olstad

    https://github.com/twbs/bootstrap/issues/40701

    I have openned an upstream issue with the twbs bootstrap project

    I imagine they may laugh at us but we'll see if any helpful suggestions come out of this.

  • 🇨🇦Canada joseph.olstad

    Our most likely D11 compatible option is to fork twbs bootstrap according to these instructions:

    https://github.com/twbs/bootstrap/issues/40701

    and upgrade the fork to support jQuery 4

  • thank you everyone for working on this :)

  • 🇨🇦Canada joseph.olstad

    A core maintainer just suggested to try dropping in jQuery 4 to see what happens. jQuery 4 is mostly backwards compatible except pertaining to some legacy browser support.

  • 🇨🇦Canada joseph.olstad

    @jcnventura , you mentioned/claimed above in comment #12 📌 Automated Drupal 11 compatibility fixes for bootstrap Needs review that bootstrap 3.4.x is not compatible with jQuery 4, however have you actually proven/tested this to be not compatible with jQuery 4?

    A current twbs bootstrap maintainer suggested to test it as it "might" already be compatible with jQuery 4.

    Apparently jQuery 4 is very compatible with jQuery 3, most of the deprecations are related to legacy browser support for browsers such as IE11 and older browsers.

    It may actually prove to be a fairly small effort to get things going with jQuery 4. Step 1 is to test it as-is.

  • 🇸🇮Slovenia KlemenDEV

    Here is a full list of changes in jQuery 4: https://blog.jquery.com/2024/02/06/jquery-4-0-0-beta/

    Maybe it is doable, maybe even this module could provide own fork of JS files of bootstrap

  • 🇵🇹Portugal jcnventura

    @joseph.olstad in #10 was the point where I got this theme to work in Drupal 11. The upstream bootstrap code has a test early on that checks for the version of jQuery being used. If it detects jQuery 4, it throws an error and refuses to run.

    My efforts stopped at that point, as asking a Drupal theme maintainer to co-maintain Bootstrap 3 is simply too much to ask (even if it is maintaining a patch and not the full library, I think it will eventually become the full library).

    We have 2 years to migrate away from Bootstrap 3. I think the best solution here would be a tutorial on the best way to migrate from this theme to another of the Bootstrap 5-based themes.

  • 🇨🇦Canada joseph.olstad

    Ok, thanks for that @jcnventura.

    We'll 100% for sure have to fork twbs bootstrap and remove that version check and any IE11/IE10 specific js code, should be a fairly easy task.

    Suggest that we add a contrib module , example, call it bootstrap3, in there would be the build sources and compile instrucitons, this is where we'd have the new version of bootstrap and it would generate an optimized min js that we'll consume and add as a dependency for use by the bootstrap theme.

    Some refactoring involved, I am imagining that this is 100% do-able.

    The radix theme actually includes bootstrap sources in it's builds, we could do something similar to what radix does but I think to align with how we've been doing things for years and to avoid hacks (radix can get messy), I'm suggesting putting it in a support module called bootstrap3 (for example).

  • 🇵🇹Portugal jcnventura

    The jQuery 4 compatible version of Bootstrap should not be a Drupal extension at all. It should probably be in GitHub and a simply be a fork of the existing sources.

  • 🇨🇦Canada joseph.olstad

    @jncventura, perhaps I'm missing something however radix is already doing something similar to what I'm suggesting we do. With that said, there's maybe a manual step that the radix project does. The Bootstrap license is an MIT License, which afaik, is compatible with Drupal licensing. Perhaps there's a nuance I'm missing here?

  • I'm not fully following the discussion here, but if it is possible to make this module D11 compatible, that would be greatly appreciated. Migrating to Bootstrap 5 would be a momentous task.

  • 🇨🇦Canada joseph.olstad

    I'm working on a 3x fork, the main branch is the v4/v5 stuff, v3-dev is the 3x dev branch, I'll set this as the default branch shortly.
    Fork is here:
    https://github.com/entreprise7pro/bootstrap

  • 🇵🇹Portugal jcnventura

    @joseph.olstad in #23 (which is weirdly unpublished), you suggested to fork twbs/bootstrap and have the build method be a Drupal method. You should be fine with just adding GitHub Actions to the fork you just did in GitHub to generate the minified Javascript libraries. Then, the only change would be to the libraries.yml of this theme to fetch the libraries from GitHub.

    There's zero need to create a Drupal module when the code you forked does not use any part of Drupal.

  • avoiding an unnecessary drupal module/module-fork would be good.

    If this module shifts from depending on and installing the original Bootstrap JS package towards depending on and installing the fork linked above, I think this should be documented and explained with thorough detail on the module home page... why it is that we needed to fork, whose behind "enterprise7pro", etc.

  • 🇨🇦Canada joseph.olstad

    Ok I've spent some time on the fork, upgraded bootstraps javascript to accept jQuery 4. I removed nearly all microsoft IE support from the entire branch. I am able to compile all of this, it is compiling and I have compiled it and pushed it up and made a github release of bootstrap and called it v3-dev-1
    the actual release once it's tested and people are happy with it will be 3.4.2

    Here's the zip file you can try out, with the dist folder has the compiled js and css
    https://github.com/entreprise7pro/bootstrap/archive/refs/tags/v3-dev-1.zip

    There's also the same thing in tar.gz
    https://github.com/entreprise7pro/bootstrap/archive/refs/tags/v3-dev-1.t...

    Hi @jncventura, ok, do you have a github account? Perhaps I can grant you admin access to my fork.
    BTW
    https://github.com/entreprise7pro/bootstrap/archive/refs/tags/v3-dev-1.zip

    I appreciate folks helping to review this build of bootstrap against Drupal 11.

    Thanks

  • 🇨🇦Canada joseph.olstad

    I've figured out how the cdn works, but I haven't added it to the docs, here it is:

    css: https://cdn.jsdelivr.net/gh/entreprise7pro/bootstrap@v3-dev-2/dist/css/bootstrap.min.css
    css_theme: https://cdn.jsdelivr.net/gh/entreprise7pro/bootstrap@v3-dev-2/dist/css/bootstrap-theme.min.css
    js: https://cdn.jsdelivr.net/gh/entreprise7pro/bootstrap@v3-dev-2/dist/js/bootstrap.min.js

    Also made a host for the docs.

    https://bootstrap.7pro.ca/

  • 🇨🇦Canada joseph.olstad

    wow very strange comment #23 vanished.

  • 🇸🇮Slovenia KlemenDEV

    Big thanks @joseph.olstad for the efforts done here! Amazing work, looking forward to the movement of this, as it would be an amazing thing not having to go to Bootstrap 5 as some of my websites would require tons of work to achieve that

  • 🇵🇹Portugal jcnventura

    @joseph.olstad Think about never actually doing any release other than alpha1, alpha2, etc. There are known security vulnerabilities that have gone unpatched for the last 5 years.. If you're going to make new versions, you need to decide if you take the responsibility to fix those vulnerabilities or if you simply ignore them. Marking them as alpha clearly signals those releases as unsupported.

  • 🇨🇦Canada joseph.olstad

    If you know of any security vulnerabilities, pleasr let me know where to find them! If they affect current supported jQuery3/4 with bootstrap 3, then they'll be dealt with, if it's for older versions only, then no.
    Keep in mind, I already gutted IE support which actually went well, was pretty straight forward.

  • 🇸🇮Slovenia KlemenDEV

    I think the IE support removal is very good change too

  • 🇨🇦Canada joseph.olstad

    working through some issues, I'll try to slow down the noise here.

  • 🇨🇦Canada joseph.olstad

    Ok, so here's the steps to get Bootstrap working with D11:

    Install the latest Drupal 11

    • mkdir web/themes/contrib
    • cd web/themes/contrib
    • git clone git@git.drupal.org:project/bootstrap.git
    • git fetch "git@git.drupal.org:issue/bootstrap-3428283.git" 'project-update-bot-only'
    • git checkout -b 'bootstrap-3428283-project-update-bot-only' FETCH_HEAD
    • install the bootstrap theme from the web ui
    • Go to bootstrap settings /admin/appearance/settings/bootstrap
    • look for the CDN settings
    • Change the provider to "Custom"
    • review the Custom URLs, place these ones in if they're not correct.
      https://cdn.jsdelivr.net/gh/entreprise7pro/bootstrap@v3-dev-6/dist/css/bootstrap.css
      https://cdn.jsdelivr.net/gh/entreprise7pro/bootstrap@v3-dev-6/dist/css/bootstrap-theme.css
      https://cdn.jsdelivr.net/gh/entreprise7pro/bootstrap@v3-dev-6/dist/js/bootstrap.js
      

      →

    1. hit the apply button
    2. press save configuration

    →

  • First commit to issue fork.
  • Pipeline finished with Success
    3 months ago
    Total: 152s
    #280627
  • Pipeline finished with Success
    3 months ago
    Total: 152s
    #280628
  • Pipeline finished with Failed
    3 months ago
    Total: 151s
    #280637
  • Pipeline finished with Failed
    3 months ago
    #280638
  • Status changed to Needs work 3 months ago
  • 🇦🇺Australia VladimirAus Brisbane, Australia

    Need to

    • Close MR 40 as it is against 7.x branch
    • Review failing phpstan messeges
  • 🇨🇦Canada joseph.olstad

    The phpstan errors are due to d.o pipeline stricter and stricter test settings for Drupal 11 that are causing this.

    They're asking for dependency injection in various spots.

  • 🇦🇺Australia VladimirAus Brisbane, Australia

    @joseph.olstad injection is now standard.
    Next minor will test for 10.4.x which is handy.

  • 🇵🇹Portugal jcnventura

    Making clear what this is all about, now that the theme already supports Drupal 11 in the 5.0.x branch

  • 🇨🇦Canada joseph.olstad

    @vladimiraus I appreciate your assistance on this. Have you tried it yourself yet with D11.0.3 ?

  • 🇵🇪Peru hatuhay Lima
  • 🇨🇦Canada joseph.olstad

    @hatuhay, thanks for that. With that said, my projects are 100% locked to bootstrap 3, bootstrap 5 is not an option.

  • 🇵🇪Peru hatuhay Lima

    @joseph.olstad
    We are just openning new choices, not closing any.

  • 🇨🇦Canada joseph.olstad

    Yes, I appreciate your bootstrap 5 efforts and have no qualms there however I'm actually a bit choked that I don't have access to edit the project page to put in a blurb about the ongoing work for Drupal 11 compatibility with Bootstrap 3x /jQuery 4, I am a co-maintainer prior to you joining but I have the lowest access rights.

  • 🇵🇹Portugal jcnventura

    @joseph.olstad, I think for CDNJS you will have to get support from the Bootstrap team to publish under their organization. Considering that HeroDevs has somehow gotten some support to be their Bootstrap 3 long-term support partner, you might need to somehow have that partnership cancelled. See https://github.com/cdnjs/cdnjs/discussions/14191

    As to jsDeliver, you can try the following: https://medium.com/javarevisited/how-to-host-your-repository-js-css-on-o... (not sure if it is still applicable).

  • 🇨🇦Canada joseph.olstad

    jsdelivr supports all github projects , what we can do is update the jdelivr provider to handle the new pattern.
    Currently the version is v3-dev-6 but is targetted to be called 3.4.2

    With that said, maybe I undo the branding changes and see if twbs is interested in merging the fixes.

  • 🇵🇹Portugal jcnventura

    Before you tag the next version you should also address and fix the following:

    1. https://nvd.nist.gov/vuln/detail/CVE-2024-6484
    2. https://nvd.nist.gov/vuln/detail/CVE-2024-6485
  • 🇸🇮Slovenia KlemenDEV

    I don't understand the ins and outs of Bootstrap, so excuse me if this is a dumb question, but what will happen with jQuery UI dependencies this module depends on? I have checked and it seems jQuery UI only works with jQuery versions up to 3.7

  • 🇨🇦Canada joseph.olstad

    @klemendev , Drupal 11 core ships with jquery.ui that is compatible with jQuery 4

    There is no issue. jQuery is upgraded to jQuery 4 in Drupal 11 however jQuery UI appears to be compatible. jQuery != jQuery UI

  • 🇸🇮Slovenia KlemenDEV

    I see, thanks for the info @joseph.olstad

  • 🇨🇦Canada joseph.olstad

    It should be possible to use https://cdn.jsdelivr.net/gh/entreprise7pro/bootstrap@3.4.2/dist/js/bootstrap.min.js, but I think you'd need to tag 3.4.2 for that to work.

    Yes, I haven't tagged 3.4.2 yet but that is the idea. I am hoping to get assistance with this issue first:

    https://github.com/entreprise7pro/bootstrap/issues/1

  • 🇸🇮Slovenia KlemenDEV

    I have attempted to fix one of the CVEs, reviews are welcome at https://github.com/entreprise7pro/bootstrap/pull/2

  • 🇨🇦Canada joseph.olstad

    Merged that and tagged a new build with the fix for CVE-2024-6485 , it looks good.
    Updating the references above to the latest cdn v3-dev-7

    Thanks very much to @klemendev!

  • 🇨🇦Canada joseph.olstad

    Updating references from v3-dev-6 to v3-dev-7

  • 🇸🇮Slovenia KlemenDEV

    Now that the critical CVE was fixed (the other one I don't believe is valid), is this ready for a release? It would be nice to see D11 ready release of Bootstrap 3 :)

    If any other help is needed, I can try to help further

  • 🇨🇦Canada joseph.olstad

    Thanks for the CVE fix!

    Awesome

    And yes, more help is needed for the bootstrap theme cdn providers, right now it's using the "Custom" provider
    we can discuss over the weekend or next week

  • thanks everyone for your work on this, very exciting :)

  • 🇨🇦Canada joseph.olstad

    what we could do is detect the drupal version , for Drupal 11, automatically set the provider to "custom" and automatically set the cdn values to the latest current as listed at https://bootstrap.7pro.ca
    This way, once we commit this Drupal 11 compatibility, we don't cause any surprises for those who will continue using Drupal 10 for quite some time yet.

  • 🇸🇮Slovenia KlemenDEV

    This could work. But still keep the local files option available, because there are use cases/users (most of our websites, for example), where local files are used.

  • 🇨🇦Canada joseph.olstad

    Ok, I've published the v3.4.2 tagged release, thanks so much for your support @klemendev

    Some work will be required to adjust this to work with the other provider but having the v3.4.2 tag will help.

    For now, use the custom provider as described above in the issue summary. Updating issue summary now to put the v3.4.2 into the cdn reference.

  • 🇸🇮Slovenia KlemenDEV

    Are there any outstanding changes needed on the module itself to run on Drupal 11?

  • 🇨🇦Canada joseph.olstad

    As discussed above, this Drupal theme is ready to use with Drupal 11 using this merge request and following the instructions. With that said, the only cdn provider option that is currently functional is the 'custom' cdn provider and the custom provider has been marked deprecated for some reason for quite some time. What would be great is for the other providers to be also optionally functional. A flag for legacy library should be added and defaulted to TRUE so that we do this harmoniously. For Drupal 11, this flag should be disabled and the library pattern should be affected by this flag which will bring in the new library pattern and the v3.4.2+ with 3.4.2 as a minimum version.

    I'm hoping this isn't too hard to do, last I checked it hinged on the release tag numbering pattern to match legacy. Now that we have 3.4.2 work can start on the other provider option. I'd appreciate assistance with this if you or someone else has time!

    If for some reason, the "custom" cdn provider becomes our only feasible option going forward then I would suggest to remove the deprecation notes on the "custom" cdn provider as this is currently our only option for Drupal 11.

    I'm optimistic that another cdn provider from the options available can be adjusted to work with the new entreprise7pro/bootstrap library v3.4.2+ with that said, I haven't had time to have another go at this so I do appreciate extra help.

    • joseph.olstad → committed 7bf0acfc on bootstrap-3428283-project-update-bot-only
      Issue #3428283 by joseph.olstad, jcnventura, vladimiraus, klemendev:...
  • This is an automated patch generated using Upgrade Status and Drupal Rector. Please see the issue summary for more details. A merge request (MR) is also openend and updated.

    It is important that any automated tests available are run and that you manually test the changes.

    Drupal 11 Compatibility

    According to the Upgrade Status module → , even with these changes, this module is not yet compatible with Drupal 11.

    Currently Drupal Rector, version 0.20.3, cannot fix all Drupal 11 compatibility problems.

    Therefore, these changes did not update the info.yml file for Drupal 11 compatibility.

    The compatibility issues that Upgrade Status found after the Drupal Rector fixes were applied are attached to help you resolve them manually.

    Leaving this issue open, even after committing the current patch or merging the MR, will allow the Project Update Bot → to post additional Drupal 11 compatibility fixes as they become available in Drupal Rector.

    Debug information

    Bot run #11-318179

    These packages were used to generate the fixes:

    1. drupal/upgrade_status: 4.3.6
    2. mglaman/phpstan-drupal: 1.3.1
    3. palantirnet/drupal-rector: 0.20.3
  • Pipeline finished with Success
    about 2 months ago
    Total: 145s
    #318363
  • 🇳🇮Nicaragua jeremy1606

    There are a few changes in MR 37 that still need to land. Besides that, what more needs to be done before official D11 support for v3 is available and new 3.x release tagged?

  • 🇨🇦Canada joseph.olstad

    See comment #69.

    What has been done so far:

    • We forked "twbs/bootstrap" into "entreprise7pro/bootstrap"
    • We removed IE support from entrepreprise7pro.ca/bootstrap
    • We upgraded this new bootstrap to be compatible with jQuery 4
    • We fixed CVE-2024-6485
    • We successfully tested Drupal 11 which brings jQuery 4 and this new bootstrap with custom cdn provider as described above

    What is todo:

    • Complete the fork of bootstrap-sass. Some folks using bootstrap 3 may also need bootstrap-sass (this shouldn't take very long to complete but isn't yet completed) - Assigned this task to myself joseph.olstad →
    • Update the other cdn providers so that when using Drupal 11 will offer one of the stable jQuery4 compatible entreprise7pro/bootstrap releases. (Currently only custom cdn is working, it would be nice if the others worked with the new bootstrap library when running Drupal 11. I'm suggesting core version detection in the project code where we check for minimum D11 and handle this gracefully in the solution. This task is ready to be worked on now.
  • heddn Nicaragua

    There's something odd going on here. MR 37 has virtually no changes in it any longer. The changes in bootstrap-3428283-project-update-bot-only branch still exist. But the MR on this issue has nothing in it. Do we need to rebase something?

  • First commit to issue fork.
  • Pipeline finished with Success
    about 2 months ago
    Total: 173s
    #330008
  • 🇬🇧United Kingdom somersoft

    Alternative installation of the code if this repository was used directly, by adding the following to the project's composer.json

        "repositories": [
            {
                "type": "vcs",
                "url": "https://git.drupalcode.org/issue/bootstrap-3428283.git"
            }
        ],
    

    and

        "require": {
            "drupal/bootstrap": "dev-project-update-bot-only",
        }
    

    then composer can create a compatible set of packages.

  • 🇨🇦Canada joseph.olstad

    joseph.olstad → changed the visibility of the branch project-update-bot-only to hidden.

  • 🇨🇦Canada joseph.olstad

    joseph.olstad → changed the visibility of the branch project-update-bot-only to active.

  • 🇨🇦Canada joseph.olstad

    @heddn, when things get dicey, I suggest re-cloning the project and following these steps.

    git remote add bootstrap-3428283 git@git.drupal.org:issue/bootstrap-3428283.git
    git fetch bootstrap-3428283
    

    git checkout -b 'project-update-bot-only' --track bootstrap-3428283/'project-update-bot-only'

    MR 37 looks as expected
    https://git.drupalcode.org/project/bootstrap/-/merge_requests/37

  • heddn Nicaragua

    MR37 did not indicate Drupal 11 support in the .info.yml file nor composer.json file. I see that overnight it was added in https://git.drupalcode.org/project/bootstrap/-/merge_requests/37/diffs?c.... That was the bit that was missing and caused me to question everything about that MR.

  • 🇨🇦Canada joseph.olstad

    **EDIT**
    checking

  • 🇨🇦Canada joseph.olstad

    MR37 is clearly identified as compatible with Drupal 11
    There are a couple todo items
    Please refer to comment #73 #3428283-73: Automated Drupal 11 compatibility fixes for bootstrap 8.x-3.x →
    My current priority is the bootstrap-sass fork , as soon as it's completed I'll update this issue.

  • heddn Nicaragua

    After upgrading to D11 with this patch installed, we cannot visit /admin/appearance/settings/bootstrap It gives guzzle errors. The IS has instructions for installing a fresh install with D11 but doesn't yet provide any guidance on upgrade. I haven't had time to investigate where the errors are coming from.

  • 🇨🇦Canada joseph.olstad

    I'll review #84 and see what's happening, currently I'm working on the bootstrap-sass fork, once that's done I'll get back to the integration part.

    What version of D11 are you upgrading to?

  • 🇨🇦Canada joseph.olstad

    I'm finalizing npm packaging for the upgraded bootstrap / bootstrap-sass.

    So far I have pushed up a gem:

    https://rubygems.org/gems/bootstrap

    I need to wait 24 hours to republish for npm, I unpublished a first attempt without knowing that it would cause a 24+ hour delay before republishing as they do not allow quick republishing.

    https://www.npmjs.com/package/entreprise7pro-bootstrap-sass
    https://www.npmjs.com/package/entreprise7pro-bootstrap

    With that said, bower is good to go for both:

    bower install entreprise7pro/bootstrap --save
    bower install entreprise7pro/bootstrap-sass --save

    Along the way I discovered that jquery 4.0.0 is still in it's second beta, so Drupal 11 ships with a beta version of jQuery 4. This is news to me.

    For the gem, because there's no ruby package for jquery 4 I cooked in the 4.0.0-beta2 version into the gem.

  • 🇨🇦Canada joseph.olstad

    I upgraded my test environment which has basically Drupal 11.0.6 core by it'self along with the D11 versions of jquery_ui, jquery_ui_draggable jquery_ui_resizable projects.

    The upgrade from Drupal 11.0.3 to 11.0.6 worked fine.

    Now with the v3.4.3 cdn, I'm seeing a version number available.

    See screenshot:

    →

  • 🇨🇦Canada joseph.olstad

    @heddn, it's possible that you need to do the following in your tests:

    composer require drupal/jquery_ui drupal/jquery_ui_draggable drupal/jquery_ui_resizable

    Please try this again then visit the appearance configuration where the cdn settings need to be adjusted.

    /admin/appearance/settings/bootstrap

  • 🇮🇳India kalash-j jaipur

    Hey @joseph.olstad I am also facing issue on accessing /admin/appearance/settings/bootstrap
    i have also used this composer require drupal/jquery_ui drupal/jquery_ui_draggable drupal/jquery_ui_resizable
    still i am facing the issue , my drupal core version is 11.0.7
    and jquery version is 4.0.0-beta.2

  • Status changed to Needs review about 1 month ago
  • 🇨🇦Canada joseph.olstad

    @kalash-j and @heddn, your exception is thrown after the alter is called for: bootstrap_form_system_theme_settings_alter

    Is it possible that you have hook_form_system_theme_settings_alter code in one of your other themes/modules that is interfering? Perhaps your sub theme?

  • 🇨🇦Canada joseph.olstad

    I merged the D11 upgrade into the 8.x-3.x , not going to tag a release, still looking into the bootswatch, I may have missed something related to the theme options.

  • 🇮🇳India manishvijay02

    @joseph.ostald I don't have the hook_form_system_theme_settings_alter function in my subtheme; it only exists in the bootstrap.theme file. However, when I comment out this line, the settings do not display correctly in the Bootstrap theme.
    In Drupal 10, the settings were fully visible without needing to comment out the hook_form_system_theme_settings_alter line, and I didn't encounter any errors.
    However, after upgrading to Drupal 11, I started receiving an error, as mentioned in #89 📌 Automated Drupal 11 compatibility fixes for bootstrap Needs review . To resolve this, I removed the hook_form_system_theme_settings_alter line from the bootstrap.theme file, which eliminated the error. But, now the settings are not displaying properly.

    Attaching the screenshots for the same.
    Thanks.

  • 🇨🇦Canada joseph.olstad

    Hi @manishvijay02 , if you uninstall your subtheme does this error still occur?

    If so, I'd like to see your subtheme.

    With that said, this might be related to some settings that you have configured. I haven't been able to reproduce the reported issue yet.

    Put back the hook code and have a closer look at this:

    src/Plugin/Form/SystemThemeSettings.php

    With that said, I've got something else to look at to improve the theme upgrade path.

  • heddn Nicaragua

    Our errors went away with one of those last commits. Looks great. We're now on D11 with the dev branch of this theme.

  • 🇸🇮Slovenia KlemenDEV

    That is some very exciting news!

  • 🇨🇦Canada joseph.olstad

    I've still got a small bit of work to do to make the upgrade path smoothest possible for everyone.

  • 🇨🇦Canada joseph.olstad

    Resolved.

    Tested and tagging an rc1 release shortly.

  • 🇨🇦Canada joseph.olstad

    I'll have to add to the release notes.

    The only cdn provider options that have been tested to work for this upgrade are jsdelivr and the custom provider option. I don't have any statistics on which providers are mostly used but I would assume that most are using either the jsdelivr option or the custom provider option.

    The bootswatch theme options are still supported.

    Please open new issues for any additional support requests/feature requests or bugs/tasks.

  • 🇨🇦Canada joseph.olstad

    FYI: A new Drupal 11 compatible release has been tagged today 8.x-3.33-rc2 →

  • 🇫🇷France mably

    Great work, thanks @joseph.olstad!

  • 🇧🇾Belarus f1mishutka Minsk

    Tremendous work! Thank to everybody!

    P.S.: I'm proud to be a part of such awesome community. Drupal people make world a better place. Literally!

  • 🇸🇮Slovenia KlemenDEV

    Thank you everybody for your outstanding work on this! :)

  • 🇸🇮Slovenia KlemenDEV

    Thanks to everyone involved in making this happen, especially to joseph.olstad for pushing the work :)

  • 🇺🇸United States DanChadwick

    This issue requires D10.2, but its 10.3 that has the stick table header change that this issue requires. Not sure if the issue status should be changed to needs work or what.

  • 🇨🇦Canada joseph.olstad

    Hi @danchadwick , thanks for reporting this issue.

    According to this report, it means that anyone using 10.2 will want to stick to 3.32 instead of upgrading.

  • 🇨🇦Canada joseph.olstad

    New release and instructions for those still using D10.2.

    https://www.drupal.org/project/bootstrap/releases/8.x-3.34 →

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

Production build 0.71.5 2024