Problem/Motivation

Drupal 11 is out.
jQuery 3 is replaced with jQuery 4.

Bootstrap 3.4.x has been forked and upgraded / tested to work with jQuery 4.
Wet-Boew has been upgraded to work with jQuery 4 (first jQuery 4 compatible release is v4.0.83)
A small shim has been put in to resolve an with a wet-boew.js dependency.

I've got the bootstrap 3 theme functioning on Drupal 11.0.3 (now 11.1.1)

Milestone

We have a functional Drupal 11.1.1 build of WxT 6.1.x in github.

Tasks Remaining

  1. Replace former core TestSuites in the github pipeline with something from core that is more current.
  2. Tag an alpha release
  3. Continue quality checks and prepare a beta/rc

Tasks already completed

  • fork and upgrade the bootstrap library https://bootstrap.7pro.ca (DONE)
  • tested the bootstrap theme with Drupal 11 and the new forked bootstrap library #3428283-38: Automated Drupal 11 compatibility fixes for bootstrap 8.x-3.x (DONE)
  • fork and upgrade the bootstrap-sass library (IN PROGRESS)
  • upgrade the CDN provider options in the bootstrap theme (DONE) included in drupal/bootstrap release 3.34
  • test wet-boew with the new jQuery 4 + bootstrap v3.4.2 forked + bootstrap-sass forked (DONE)
  • (co-ordinate this with the wet-boew folks so that we get a jQuery 4 compatible version of wet-boew.) (DONE) release 4.0.83
  • Many other tasks were completed to achieve the above stated milestone

#3428283: Automated Drupal 11 compatibility fixes for bootstrap 8.x-3.x

Proposed resolution

See issue summary

Remaining tasks

See issue summary

User interface changes

TBD

API changes

Numerous changes

Data model changes

As you'd expect with a major release there are some schema updates from core and contrib.

Comments

joseph.olstad created an issue. See original summary.

joseph.olstad’s picture

Issue summary: View changes
joseph.olstad’s picture

Issue summary: View changes
joseph.olstad’s picture

joseph.olstad’s picture

Working on a plan to fork bootstrap 3.4.x and provide a jQuery 4 compatible version.

joseph.olstad’s picture

Issue summary: View changes
joseph.olstad’s picture

Issue summary: View changes
joseph.olstad’s picture

joseph.olstad’s picture

I've got bootstrap 3 functioning on Drupal 11.0.3

Instructions and illustrations here:

#3428283-38: Automated Drupal 11 compatibility fixes for bootstrap 8.x-3.x

Next step is to make it work with wet-boew.

This might eventually require forking wet-boew just as I have forked bootstrap.

liam morland’s picture

It would be nice to be able to run upgrade_status. I tried to do that in #3472183: Enable GitLab CI automated testing but if you look at the pipelines in the merge request, you can see that it does not run properly.

smulvih2’s picture

Version: 5.2.x-dev » 5.3.x-dev
Related issues: +#3421844: CVE-2024-24815

I think we should consider removing CKE4 from our D11 upgrade. I'm noticing some funny JS console errors now, ckeditor.js is trying to load two files that don't exist (config.js, styles.js). This doesn't seem to impact functionality. I'm not able to find an issue for this on the drupal/ckeditor issue queue, but it's also not a supported module anymore.

The latest release of drupal/ckeditor is 1.0.2, and it loads ckeditor/ckeditor4 4.18.0. ckeditor/ckeditor4 has an XSS vulnerability for < 4.24.0-lts. If your site doesn't expose an editor to the public then it's probably not as big of a risk. See related issue from drupal/ckeditor talking about this issue in more detail.

CKEditor 4 LTS is a paid service, and is apparently pretty expensive. You need to pass a license key to the editor config in order to have access.

If you wish to purchase a commercial CKEditor 4 LTS license, contact us to receive an offer tailored to your needs. - CKEditor 4 LTS License key and activation.

joseph.olstad’s picture

Issue summary: View changes
joseph.olstad’s picture

Assigned: Unassigned » joseph.olstad
 ╰❯ $ drush upgrade_status:analyze wxt_library
 [notice] Processing /var/www/d11/web/modules/contrib/wxt_library.

================================================================================
WxT Library,  8.x-8.3
Scanned on mer 13/11/2024 - 17:48

FILE: web/modules/contrib/wxt_library/wxt_library.info.yml

STATUS         LINE                           MESSAGE                           
--------------------------------------------------------------------------------
Check manually 4    Value of core_version_requirement: ^9 || ^10 is not         
                    compatible with the next major version of Drupal core. See  
                    https://drupal.org/node/3070687.                            
--------------------------------------------------------------------------------

FILE: web/modules/contrib/wxt_library/composer.json

STATUS         LINE                           MESSAGE                           
--------------------------------------------------------------------------------
Check manually 1    The drupal/core requirement is not compatible with the next 
                    major version of Drupal. Either remove it or update it to be
                    compatible. See                                             
                    https://www.drupal.org/docs/develop/using-composer/add-a-com
                    poserjson-file#core-compatibility.                          
--------------------------------------------------------------------------------

now for wxt_bootstrap:

 ╰❯ $ vendor/drush/drush/drush upgrade_status:analyze wxt_bootstrap
 [notice] Processing /var/www/d11/web/themes/contrib/wxt_bootstrap.

================================================================================
WxT Bootstrap, --
Scanned on mer 13/11/2024 - 17:51

FILE: web//var/www/d11/vendor/symfony/deprecation-contracts/function.php

STATUS         LINE                           MESSAGE                           
--------------------------------------------------------------------------------
Check manually 25   Since twig/twig 3.9: Using the internal                     
                    "twig_escape_filter_is_safe" function is deprecated.        
--------------------------------------------------------------------------------

FILE:
web/themes/contrib/wxt_bootstrap/templates/block/block--block-content--search.ht
ml.twig

STATUS         LINE                           MESSAGE                           
--------------------------------------------------------------------------------
Check manually 72   Twig template                                               
                    themes/contrib/wxt_bootstrap/templates/block/block--block-co
                    ntent--search.html.twig contains a syntax error and cannot  
                    be parsed.                                                  
--------------------------------------------------------------------------------

FILE: web/themes/contrib/wxt_bootstrap/templates/file/file-link.html.twig

STATUS         LINE                           MESSAGE                           
--------------------------------------------------------------------------------
Ignore         18   Since twig/twig 3.12: Twig Filter "spaceless" is deprecated.
                    See https://drupal.org/node/3071078.                        
--------------------------------------------------------------------------------

FILE:
web/themes/contrib/wxt_bootstrap/templates/input/input--button--split.html.twig

STATUS         LINE                           MESSAGE                           
--------------------------------------------------------------------------------
Ignore         26   Since twig/twig 3.12: Twig Filter "spaceless" is deprecated.
                    See https://drupal.org/node/3071078.                        
--------------------------------------------------------------------------------

FILE:
web/themes/contrib/wxt_bootstrap/templates/input/input--button--submit.html.twig

STATUS         LINE                           MESSAGE                           
--------------------------------------------------------------------------------
Ignore         25   Since twig/twig 3.12: Twig Filter "spaceless" is deprecated.
                    See https://drupal.org/node/3071078.                        
--------------------------------------------------------------------------------

FILE: web/themes/contrib/wxt_bootstrap/templates/input/input--button.html.twig

STATUS         LINE                           MESSAGE                           
--------------------------------------------------------------------------------
Ignore         25   Since twig/twig 3.12: Twig Filter "spaceless" is deprecated.
                    See https://drupal.org/node/3071078.                        
--------------------------------------------------------------------------------

FILE:
web/themes/contrib/wxt_bootstrap/templates/input/input--form-control.html.twig

STATUS         LINE                           MESSAGE                           
--------------------------------------------------------------------------------
Ignore         24   Since twig/twig 3.12: Twig Filter "spaceless" is deprecated.
                    See https://drupal.org/node/3071078.                        
--------------------------------------------------------------------------------

FILE: web/themes/contrib/wxt_bootstrap/templates/input/input.html.twig

STATUS         LINE                           MESSAGE                           
--------------------------------------------------------------------------------
Ignore         22   Since twig/twig 3.12: Twig Filter "spaceless" is deprecated.
                    See https://drupal.org/node/3071078.                        
--------------------------------------------------------------------------------

FILE: web/themes/contrib/wxt_bootstrap/templates/input/select.html.twig

STATUS         LINE                           MESSAGE                           
--------------------------------------------------------------------------------
Ignore         18   Since twig/twig 3.12: Twig Filter "spaceless" is deprecated.
                    See https://drupal.org/node/3071078.                        
--------------------------------------------------------------------------------

FILE: web/themes/contrib/wxt_bootstrap/templates/system/page.html.twig

STATUS         LINE                           MESSAGE                           
--------------------------------------------------------------------------------
Check manually 138  Twig template                                               
                    themes/contrib/wxt_bootstrap/templates/system/page.html.twig
                    contains a syntax error and cannot be parsed.               
--------------------------------------------------------------------------------

FILE: web/themes/contrib/wxt_bootstrap/wxt_bootstrap.info.yml

STATUS         LINE                           MESSAGE                           
--------------------------------------------------------------------------------
Check manually 4    Value of core_version_requirement: ^9 || ^10 is not         
                    compatible with the next major version of Drupal core. See  
                    https://drupal.org/node/3070687.                            
--------------------------------------------------------------------------------

FILE: web/themes/contrib/wxt_bootstrap/composer.json

STATUS         LINE                           MESSAGE                           
--------------------------------------------------------------------------------
Check manually 1    The drupal/core requirement is not compatible with the next 
                    major version of Drupal. Either remove it or update it to be
                    compatible. See                                             
                    https://www.drupal.org/docs/develop/using-composer/add-a-com
                    poserjson-file#core-compatibility.                          
--------------------------------------------------------------------------------


joseph.olstad’s picture

StatusFileSize
new24.77 KB
new887 bytes

First the good news!

I was able to frankenstein a build of Drupal 11 that included the wet-boew libraries
and patched wxt_bootstrap / wxt_library for Drupal 11 compatibility, what is fairly impressive is that things are mostly working in this state.

I have some very lightly tested patches for wxt_library / wxt_bootstrap , there are likely regressions that I haven't caught yet.

The somewhat expected challenge remaining is the fact that wet-boew includes Modernizr (only required for IE which is no longer support) minor jQuery v4 compatibility challenges to work out. With that said, it's all looking fairly good with the upgraded bootstrap library.

The version of bootstrap being used is straight off the D11 merge request commit following the instructions mentioned here:
#3428283: Automated Drupal 11 compatibility fixes for bootstrap 8.x-3.x

joseph.olstad’s picture

StatusFileSize
new89.36 KB

Screenshot of this progress:
D11 in action with upgrade bootstrap v3.4.3 jQuery 4 and wet-boew

joseph.olstad’s picture

I've forked wet-boew and working on jQuery 4 compatibility fixes, I'll be testing local builds before pushing it up for review to the wet-boew folks.

No longer need to use the merge request branch from https://drupal.org/project/bootstrap , there is now a D11 compatible version in the 8.x-3.x branch (not yet tagged, I'm verifying a few things yet before making a tag).

https://www.drupal.org/project/bootstrap/releases/8.x-3.x-dev

smulvih2’s picture

Great news @joseph, this is a major piece to the D11 upgrade!

joseph.olstad’s picture

More good news, I pushed a PR up to wet-boew that resolves the jQuery 4 compatibility issues in wet-boew.js.

The PR only resolves the jQuery 4 compatibility issues noticed when using Drupal 11 / wxt_library /wxt_bootstrap as described above, but also has passed the wet-boew lint and automated testing.

Screenshots in the PR of before/after.

https://github.com/wet-boew/wet-boew/pull/9831

Once they approve/merge the PR we'll likely want to crank up our wet-boew from 4.0.75 to 4.0.83 . I'm hoping this jQuery 4 fix makes it into 4.0.83.

joseph.olstad’s picture

@smulvih2, we're basically at the point now where we need a wxt 6 branch and we need to think about pushing up/reviewing the wxt_library and wxt_bootstrap related changes, review and test those and then get started on the wxt custom module upgrades from 10 to 11.

Meanwhile, I'll continue working towards a tagged release of the https://drupal.org/project/bootstrap build which is fairly close as it's in 8.x-3.x dev right now.

joseph.olstad’s picture

Assigned: joseph.olstad » Unassigned

The wet-boew PR for jQuery 4 compatibility has been pre-approved by Garneauma and is undergoing thorough testing which I suspect will pass.

joseph.olstad’s picture

joseph.olstad’s picture

It would be good to get some mileage (additional testing) on the wxt_bootstrap patch against Drupal 10 and wxt 5.3.x in preparation for D11.

joseph.olstad’s picture

w00t!

WET-BOEW merged our pull request.

The next release of WET-BOEW will be compatible with jQuery 4 and thus compatible with Drupal 11!

https://github.com/wet-boew/wet-boew/commits/master/

Meanwhile over 1200 new installs of bootstrap 3.33 which includes the Drupal 11 in only 5 days of statistics being collected. Zero complaints from any of those.

smulvih2’s picture

Awesome, this gets us one step closer to to D11!

joseph.olstad’s picture

@smulvih2
*** unrelated to WxT but is related to Drupal 11 upgrade ***
FYI, there's a new module that replaces embed_block

https://www.drupal.org/project/ckeditor_insert_blocks

I believe you had done some work on this.

The embed_block maintainer has not taken much action for a few years now and ckeditor_insert_blocks is designed for use with ckeditor5
*** End of unrelated to WxT ***

joseph.olstad’s picture

For the D11 upgrade, it will have to target 11.1 as this is the expected upgrade path from 10.4

Today in the #d11readiness slack channel , been discussing the fontawesome D11 upgrade with one of their maintainers. Expect it to be ready this week, possibly tonight.

Let's take inventory of all the modules for wxt , hopefully everything else is ready. Some maintainers are forced a contrib major version change but often it's really minor.

joseph.olstad’s picture

wet-boew v4.0.83 was tagged and released and is compatible with jQuery 4 which means it is now compatible with Drupal 11.

bootstrap 3.34 (over 5000 installs after only a few weeks)
with
wet-boew v4.0.83

are compatible with Drupal 10.4.0 and also Drupal 11.1.0+

Meanwhile, views_bootstrap has a dev release available which is compatible with Drupal 11. I will ping the maintainer to ask for a tagged release. With that said, we can start with this: https://www.drupal.org/project/views_bootstrap/releases/5.3.x-dev

smulvih2’s picture

@joseph I'm working on WxT 6.1.x now and using your drupal/bootstrap ^5.0, great work on this!

Running into another issue, with views_bootstrap. To keep on Bootstrap 3, we need to use the 5.3.x branch, which doesn't support D11 (yet). Could use your help with this, especially since you are a maintainer for drupal/bootstrap.

joseph.olstad’s picture

@smulvih2, ah, no, bootstrap 5 is not compatible with bootstrap 3, use drupal/bootstrap: ^3.34

The maintainer from Bario managed to take over the 5.x branch which has nothing to do with the version we need.

This is the release we need:

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

as for views_bootstrap

use the dev release, it is Drupal 11 compatible:

composer require 'drupal/views_bootstrap:5.3.x-dev@dev'

joseph.olstad’s picture

@smulvih2 , reminder if you have not done so already. For Drupal 11 compatibility please make sure to apply the patch to wxt_library

https://www.drupal.org/files/issues/2024-11-13/wxt_library-3466676-14.patch

and the patch to wxt_bootstrap

https://www.drupal.org/files/issues/2024-11-13/wxt_bootstrap-3466676-14....

smulvih2’s picture

Here is the list of all module/packages in WxT that do not have a D11.1 compatible version, even in their respective dev branches:

  • drupal/button_link
  • drupal/embed
  • drupal/url_embed
  • drupal/entity_block
  • drupal/entity_browser_block
  • drupal/entity_embed
  • drupal/fontawesome
  • drupal/layout_builder_st
  • drupal/layout_library
  • drupal/toc_api

I will work on implementing the drupaloverrides composer workaround for these modules, as we have used in previous upgrades.

Proposing to remove the following modules from WxT:

smulvih2’s picture

Was able to get WxT composer update working with core 11.1.0. This includes updating all dependencies and replacing/removing patches as needed. Please find below a snapshot of my local composer.json overrides that were needed in order to get this working. These changes have been rolled into the 6.1.x branch so others can install. Next will be fixing some errors in our custom module space.

Local composer.json changes:

"patches": {
            "drupal/page_manager": {
                "Enter drupal/page_manager patch #2752227 description here": "https://www.drupal.org/files/issues/2024-08-22/2752227-50.patch"
            },
            "drupal/bootstrap_layouts": {
                "3481450": "https://www.drupal.org/files/issues/2025-01-06/3481450-12.patch"
            },
            "drupal/menu_breadcrumb": {
                "3485520": "https://www.drupal.org/files/issues/2025-01-06/3485520-8.patch"
            }
        },
        "patches-ignore": {
            "drupalwxt/wxt": {
                "drupal/core": {
                    "3177182 - Book title in breadcrumb not translated": "https://www.drupal.org/files/issues/2020-10-20/book-breadcrumb_title_xlate-3177182-3.patch",
                    "Enter drupal/core patch #2546212 description here": "https://www.drupal.org/files/issues/2020-11-07/2546212-158.patch",
                    "Enter drupal/core patch #2938129 description here": "https://www.drupal.org/files/issues/2024-01-21/drupal-PageTitle_block-2938129-42.patch",
                    "Enter drupal/core patch #3173808 description here": "https://www.drupal.org/files/issues/2024-01-14/3173808-26.patch",
                    "Enter drupal/core patch #3207813 description here": "https://www.drupal.org/files/issues/2021-04-08/3207813-2.patch",
                    "Enter drupal/core patch #3236799 description here": "https://www.drupal.org/files/issues/2021-12-22/drupal-core-9.2.x-li-role-separator-tag-linkGenerator-3236799-11.patch",
                    "3150294 - New translations for moderated nodes are not created in the initial workflow state": "https://www.drupal.org/files/issues/2024-01-03/3150294-128.patch"
                },
                "drupal/bootstrap": {
                    "3249470 - Error generated when importing translation": "https://www.drupal.org/files/issues/2021-11-17/3249470-3.patch"
                },
                "drupal/page_manager": {
                    "Enter drupal/page_manager patch #2710169 description here": "https://www.drupal.org/files/issues/page_manager-block-css-attributes-9.patch",
                    "Enter drupal/page_manager patch #2752227 description here": "https://www.drupal.org/files/issues/2021-04-14/2752227-47.patch"
                },
                "drupal/linkit": {
                    "Enter drupal/linkit patch #3457958 description here": "https://www.drupal.org/files/issues/2024-06-28/linkit--testing-static-methods--3457958.patch",
                    "Detect and strip base URL from pasted URLs to increase matching hits": "https://www.drupal.org/files/issues/2023-11-02/linkit6x-3078075-77.patch"
                }
            }
        }
smulvih2’s picture

Fixed one issue with the wxt_ext_layout module and now I have successfully upgraded a vanilla WxT 5.3.x to 6.1.x on core 11.1.0. This is just the first iteration to get the site functional, although there are a few issues I notice immediately, which I will work on next. All changes pushed to drupalwxt/wxt 6.1.x.

smulvih2’s picture

My MR for drupal/entity_block was just merged and now there is a D11 version available, 2.0.x. Scratching this one off the list, only 9 remaining.

smulvih2’s picture

Will need to prepare 5.4.x to unsinstall the following modules:

  • block_content_permissions
  • ckeditor
  • ckeditor4_codemirror
smulvih2’s picture

Updated wet-boew/wet-boew to 4.0.83 to get jQuery 4 compatibility, now all JS console errors on forward-facing GCWeb theme are gone, everything functions as expected!

Specifically we needed this PR from @joseph - https://github.com/wet-boew/wet-boew/pull/9831

Edit:

Still get one JS error, when clicking the "Share this page" button to trigger a modal, I get this JS error:

Uncaught TypeError: c.isArray is not a function

File: http://localhost/libraries/wet-boew/js/deps/jquery.magnific-popup.min.js...

joseph.olstad’s picture

Hmm, ok, time to make another PR to fix that. Ah, it's a dependency

js/deps (deps=dependency)

still will need a PR.

smulvih2’s picture

I created a new branch for docker-scaffold, 11.1.x, that uses drupal:11.1.1-php8.3-fpm-alpine3.21 as a base image. Just tested this branch locally and it works well on a site upgraded from docker-scaffold 10.4.x.

joseph.olstad’s picture

Logged an issue upstream in wet-boew/wet-boew

Hope to fix soon

https://github.com/wet-boew/wet-boew/issues/9846

possible workaround suggestion:

joseph.olstad’s picture

Should be an easy fix/workaround for this:
Add this Javascript, ensure it loads just before or after (maybe try both) wet-boew.js

if (typeof Zepto !== 'undefined' && typeof Zepto.isArray !== 'function') {
    Zepto.isArray = Array.isArray;
}

If that doesn't work, do the same thing for jQuery

if (typeof jQuery !== 'undefined' && typeof jQuery.isArray !== 'function') {
    jQuery.isArray = Array.isArray;
}
smulvih2’s picture

Got WxT 6.1.x installing from scratch! Will be testing the migrations, theme, and other functionality next, but looking good so far.

joseph.olstad’s picture

StatusFileSize
new307 bytes
new2.47 KB

Testing it out, needs a couple patches:

joseph.olstad’s picture

StatusFileSize
new725 bytes

Another patch

joseph.olstad’s picture

patch 42a fixes allowing turning on and off css / js aggregation and cache settings.
patch 42b allows changing the wxt_library theme
patch 43 resolves a php warning/error message that is thrown by the report a problem form

smulvih2’s picture

@joseph thanks for the patches. Patch 42b is not needed, I made this change earlier today - https://github.com/drupalwxt/wxt_library/commit/c4dce84af54132cf62c4f21a5a3db85d3f80083c

I'll include patches 42a and 43 next, thanks for this!

joseph.olstad’s picture

drupaloverride/entity_browser_block

can be replaced with

drupal/entity_browser_block:'^2.0'

@smustgrave became maintainer of entity_browser_block and he published a D11 release for this one tuesday jan 14.

Share this page works wonderfully, had to try it! :)

joseph.olstad’s picture

StatusFileSize
new945 bytes

Replace one of those patches.

joseph.olstad’s picture

StatusFileSize
new1.53 KB

and this patch for page_manager has to go on top of our other page_manager patches, put it at the end.

To reproduce the bug, log out of wxt vanilla and log back in again. You'll see a page_manager exception which prevents log-in. This patch fixes it. With that said, something is broken with H1 titles, I've got sample content loaded but I don't see the title. Probably related.

smulvih2’s picture

@joseph I tested and merged patch 42a, I can confirm it fixes the issue with the performance page. Patch 42b was already fixed the other day. For patch 43, although it did fix the warning/error, the success message for that webform was not returning. I had to use an AjaxResponse() to get this to work, and now the success message is displayed after the "Yes" button is clicked on the webform "Did you find...". I also confirmed that the "Yes" is being logged to the webform submission as expected. This has all been resolved and pushed to 6.1.x.

Will look at the page_manager issue now, and why it's preventing us from logging in. Thanks!

smulvih2’s picture

@joseph the page_manager issue has been resolved, and is now fixed in 6.1.x.

joseph.olstad’s picture

Cool, great work. I'll update my build soon and check this out. The Ajax fix sounds perfect thanks

Hiding the related patches here accordingly.

smulvih2’s picture

Running the builds in GitHub to get them passing before releasing an alpha version. There were some changes to the docker-scaffold needed, as well as some PHPCS fixes.

Both builds (mysql, psql) are still failing.

For psql, D11 requires >=16:

* The database server version /12.22/ is less than the minimum required
version /16/.

For mysql, it can't find a Kernel test file:

Test file "/var/www/html/core/./tests/TestSuites/KernelTestSuite.php" not found
make: *** [docker/Makefile:137: phpunit] Error 2

Will continue looking into these issues tomorrow.

joseph.olstad’s picture

Issue summary: View changes
joseph.olstad’s picture

Issue summary: View changes
smulvih2’s picture

Upgraded to psql 16, and fixed the issue with the mysql test from #52. Now running into these phpunit test errors:

There were 2 PHPUnit errors:

1) Drupal\Tests\Composer\Generator\BuilderTest::testBuilder
The data provider specified for Drupal\Tests\Composer\Generator\BuilderTest::testBuilder is invalid
Class "Drupal\Composer\Composer" not found

/var/www/html/core/tests/Drupal/Tests/Composer/Generator/BuilderTest.php:91

2) Drupal\Tests\ComposerIntegrationTest::testComposerTilde
The data provider specified for Drupal\Tests\ComposerIntegrationTest::testComposerTilde is invalid
The "/var/www/html/composer" directory does not exist.

/var/www/html/core/tests/Drupal/Tests/ComposerIntegrationTest.php:55

Seems to be same issues as the related ticket.

smulvih2’s picture

Think I found the issue with the failing phpunit tests. For some reason, composer is not bringing in the /composer directory from core.

smulvih2’s picture

Ok figured out the issue with the tests, a bit confusing.

I thought this was drupal/core: https://git.drupalcode.org/project/drupal/-/tree/11.1.x?ref_type=heads

But the composer.json in the root of this repo is drupal/drupal. There is another composer.json file in /core, and that's drupal/core. So when we are requiring drupal/core-recommended, that requires drupal/core, and so the other files/directories in the root of that repo are not included.

To fix the issue, I added drupal/drupal to require-dev. This puts drupal/drupal in the vendor directory. I then use a composer post install/update script to move vendor/drupal/drupal/composer/* into html/composer.

Now the Drupal\Tests\Composer\Generator\BuilderTest class, which requires the /composer directory to be in place, can access the proper drupal verison of composer with the Composer::drupalVersionBranch() method, which is obviously drupal specific.

Now both mysql and psql tests are passing in GitHub.

joseph.olstad’s picture

ok wow, kinda weird but ya great sleuthing!

smulvih2’s picture

Got all tests passing in GitHub and now also all tests passing with GitLab CI. Pushed out a dev release, 6.1.x-dev. Still a few known issues to resolve, and more testing (fresh install and upgrade from 5.4.x), but wanted to get a dev release out so people can start testing.

Known issues / Remaining tasks:

  • Using [toc] token and saving a page results in WSOD
  • GitHub actions like changelog.yml and tag.yml are failing. (will need @sylus for input here)
  • drupalwxt/docker-scaffold and drupalwxt/site-wxt have been updated, but still need to look at drupalwxt/wxt-project, drupalwxt/helm-drupal, and drupalwxt/terraform-kubernetes-drupalwxt (will need @sylus for input here)
  • Need full regression of all functionality (creating nodes, CKE5 plugins, WxT migrated content, themes, etc...)
  • Removal of drupaloverrides in composer.json as remaining modules get stable releases for D11
joseph.olstad’s picture

Ok, a bit of a minor issue for me, as I can do workarounds, but we could smoothen this part out.

In order to upgrade to WxT 6.1.x the following modules must be uninstalled before going into D11

  • ckeditor this module is not available in D11 and will not be made available
  • ckeditor4_codemirror (while this module IS Drupal 11 compatible, it has a dependency on the "ckeditor" module which is marked obsolete/unsupported thus preventing it from being installed in D11).

Here's what happens when you try to uninstall keditor4_codemirror in WxT 5.4.x:

do you also want to uninstall wxt_ext_editor? So there's a dependency set in wxt_ext_editor, which is fine for 5.4.x but in 6.1.x there's no ckeditor4_codemirror module available. It could be faked out with a stub module like drush gen module. just to get an info.yml for it to be able to uninstall it. I'll do this myself but we could make this easy by including this in the wxt/custom/modules

core modules removed from D11

  • tour
  • action

These two modules can be brought back in via contrib, I'll do this

composer require drupal/tour:'^2.0'
composer require drupal/action:'^0.2'

ok not such a big deal for the core modules, they're now available in contrib.

action is required for things like vbo and I know moderated_content_bulk_publish likely needs it.

joseph.olstad’s picture

codemirror - test to see how this is working.

This is the library I'm including:

        {
            "type": "package",
            "package": {
                "name": "cdubz/ckeditor5-source-editing-codemirror",
                "version": "35.1.0",
                "type": "drupal-library",
                "extra": {
                    "installer-name": "ckeditor5-source-editing-codemirror"
                },
                "dist": {
                    "url": "https://registry.npmjs.org/@cdubz/ckeditor5-source-editing-codemirror/-/ckeditor5-source-editing-codemirror-35.1.0.tgz",
                    "type": "tar"
                },
                "require": {
                    "composer/installers": "*"
                }
            }
        },
        {
            "type": "package",
            "package": {
                "name": "codemirror/codemirror",
                "version": "5.65.12",
                "type": "drupal-library",
                "extra": {
                    "installer-name": "codemirror"
                },
                "dist": {
                    "url": "https://registry.npmjs.org/codemirror/-/codemirror-5.65.12.tgz",
                    "type": "tar"
                },
                "require": {
                    "composer/installers": "*"
                }
            }
        },

and then corresponding entries in the require section of the composer.json

from the ckeditor_codemirror composer.libraries.json:

joseph.olstad’s picture

@smulvih2,

reminder, since we're using overrides, the namespace of patches needs to follow suit.

What I'm doing is this:

            "drupaloverride/layout_builder_st": {
                "3069964 - Argument 1 passed to isTranslation must implement SectionStorageInterface, null given.": "https://www.drupal.org/files/issues/2025-01-02/3069964-null-fix.patch"                 
            },      
            "drupal/layout_builder_st": {
                "3069964 - Argument 1 passed to isTranslation must implement SectionStorageInterface, null given.": "https://www.drupal.org/files/issues/2025-01-02/3069964-null-fix.patch"
            },

I'm keeping both, since eventually we'll remove the overrides but we need the patches either way (for now).

This applies to other drupaloverrides modules, we're possibly missing patches for when running 6.1.x.

Definately need this null-fix patch. I hit this when trying to log in.

joseph.olstad’s picture

Found (and fixed) a deprecation issue caused by using a deprecated createPseudo call in wet-boew.js

tested a fix, success

openned a PR for wet-boew

Issue link:
https://github.com/wet-boew/wet-boew/issues/9851

smulvih2’s picture

Removed dependencies on block_content_permissions and ckeditor4_codemirror from 5.4.x-dev to prepare for 6.1.x upgrade. This will allow uninstalling the following modules as part of pre-deployment steps for the upgrade:

Uninstall the following modules (pre-deployment for 6.1.x):

  • block_content_permissions
  • ckeditor4_codemirror
  • ckeditor

With this change, GitHub and GitLab tests are passing. On a fresh install of 5.4.x-dev, you will notice the CKE4 text formats are basically empty, this is needed to prepare for CKE4 removal. If projects want to keep CKE4, they will have to add these dependencies to their root composer.json file. WxT will keep custom CKE4 plugins for a while longer to support this type of setup, but will no longer support CKE4 otherwise.

smulvih2’s picture

Running into some JS errors on a project, and noticed the bootstrap JS files that come with wxt_bootstrap are from v3.3.6 (2015). We should try updating these to the latest 3.4.1 (2019).

joseph.olstad’s picture

@smulvih2 , bootstrap 3.34 requires version 3.4.4 of the library

you can select this in the cdn provider option by toggling and switching to jsdelivr

smulvih2’s picture

Here's one example JS error:

Uncaught TypeError: $.isFunction is not a function

This is coming from themes/contrib/wxt_bootstrap/js/bootstrap/tooltip.js. If I look at the latest boostrap v3.4.1, it still uses the ifFunction call, which was deprecated in jQuery 3.3 and removed in jQuery 4.0. I think this will be an issue with Bootstrap 3 with jQuery4; Bootstrap 3 is not compatible with jQuery 4. Might have to fork Bootstrap 3 to get working with jQuery4, or get wet-boew upgraded to use Bootstrap 4+.

smulvih2’s picture

Actually I see that the latest drupal/bootstrap 3.34 has the JS fixes for jQuery4 support, so need to update the JS files in wxt_bootstrap to use these, or remove from wxt_bootstrap and just reference the ones from drupal/bootstrap.

joseph.olstad’s picture

yes bootstrap 3.34 has these fixes and we cannot use twbs/bootstrap 3.4.1 it has to be entreprise7pro/bootstrap 3.4.4 to attain jQuery v4 support. We'll have to sort this out.

joseph.olstad’s picture

StatusFileSize
new22.62 KB

Here's the jQuery 4 fixes for the outdated js in wxt_bootstrap

This brings us up to 3.4.4

smulvih2’s picture

@joseph thanks for the patch, this get the jQuery4 fixes into wxt_bootstrap for the local bootstrap files. This has been merged with wxt_bootstrap 11.1.x. I also added GitLab CI for wxt_bootstrap and got all tests passing. Pushed out a dev release, 11.1.x-dev.

joseph.olstad’s picture

I updated the release notes for bootstrap 3.35 , and updated a related support request relating to this.

The correct configuration for subtheme cdn settings is to leave it to "compiled" and "none". The bootstrap theme settings should be the only decider here due to the need to do an automatic upgrade as Drupal 11 does not support twitter bootstrap, it only supports entreprise7pro bootstrap.

Instructions are in the release notes https://www.drupal.org/project/bootstrap/releases/8.x-3.35

The Default install of WxT 6.1.x does not have an issue.

joseph.olstad’s picture

StatusFileSize
new19.29 KB
new27.88 KB

Extensive testing - Discovered something that looks like a wxt bug, might be also in 5.4 but I'm seeing this in 6.1.x

Step 1) edit or add a user then select a picture for them

illustration:
illustration step 1

Step 2) Check the browser console ajax exception message

ajax exception in console points to wxt_ext_media

joseph.olstad’s picture

StatusFileSize
new1.34 KB

Untested patch, possibly helps with comment #74

joseph.olstad’s picture

Patch #75 leads to something deeper with the file extension validation going on in wxt_ext_media. Here's the related change notice:

https://www.drupal.org/node/3363700

The new approach was introduced in version: 10.2.0, however the deprecated approach was removed in 11.0.0.

So , therefore, bunch of refactoring is needed in wxt_ext_media. See the change notice for more details on how to refactor related wxt_ext_media validation logic. A bit tricky business.

joseph.olstad’s picture

StatusFileSize
new2.7 KB

New patch, testing it.

joseph.olstad’s picture

Assigned: Unassigned » joseph.olstad

patch 77 is an incomplete refactor, working on it. next one I will test before uploading.

joseph.olstad’s picture

StatusFileSize
new5.87 KB

ok new patch, it's not working yet, not sure what the issue is caused by whether it's dropzonejs or an incorrect refactor of wxt_ext_media

This patch was created as an attempt to follow this change notice : https://www.drupal.org/node/3363700

It's a work in progress.

joseph.olstad’s picture

StatusFileSize
new5.89 KB

Ok another patch, still doesn't fix the issue but gets us closer.

This patch was created as an attempt to follow this change notice : https://www.drupal.org/node/3363700

It's a work in progress.

joseph.olstad’s picture

StatusFileSize
new12.43 KB

new patch.
it's better but still not complete.

joseph.olstad’s picture

Version: 5.3.x-dev » 6.1.x-dev
Related issues: +#3431856: Automated Drupal 11 compatibility fixes for media_bulk_upload

Ok I've dug deeper into this, my patch is really close.

With that said, I found out that degov , govcms and vardot also used lightning_media

They're now using media_bulk_upload.

There's a MASSIVE merge request for media_bulk_upload to make it Drupal 11 compatible and it is marked RTBC with a lot of work having gone into it.

https://www.drupal.org/project/media_bulk_upload/issues/3431856

At some point (soon?), we should look at replacing wxt_ext_media_bulk_upload with
media_bulk_upload.

With that said, still need to fix wxt_ext_media, not bulk.

joseph.olstad’s picture

StatusFileSize
new16.1 KB

Ok here's another patch, this one actually behaves much better than 5.4.x which is completely broken btw.

This patch can be applied to both 5.4.x and 6.1.x

joseph.olstad’s picture

Version: 6.1.x-dev » 5.3.x-dev
Related issues: -#3431856: Automated Drupal 11 compatibility fixes for media_bulk_upload
StatusFileSize
new678 bytes

One more patch, this time for wxt_bootstrap. I'll also have to put this into the entreprise7pro/bootstrap build.

joseph.olstad’s picture

Version: 5.3.x-dev » 6.1.x-dev

is meant for 6.1.x mostly

joseph.olstad’s picture

joseph.olstad’s picture

Assigned: joseph.olstad » Unassigned
Status: Active » Needs review

In addition to the pull requests, there's a bunch of the overrides modules that got releases. Go through those soon.

joseph.olstad’s picture

The js patch is related to an upstream js change in bootstrap 3.4.6
https://github.com/entreprise7pro/bootstrap/compare/v3.4.5...v3.4.6#diff...

joseph.olstad’s picture

To help soften the landing of Drupal 11 we've created a new contrib module:

JQuery Downgrade

  • jQuery downgrade, aiming to keep the use of this module to the bare minimum as from what we can tell so far the WxT distribution out of the box doesn't need any special treatment like this.
  • Created because we live in an imperfect world and have to be pragmatic.
  • The jquery_downgrade module gives us flexibility to "downgrade" for a specific node (nid) or set of nodes (one per line) or view pages and can optionally be downgraded globally on a per theme bases.
  • Additional configuration options are foreseen and patches to improve this module will be recieved warmly.
smulvih2’s picture

@joseph I tested your PR #313 for WxT. To completely fix the issue with entity_browser I had to make a small change to wxt_ext_media, as well as created a patch for entity_browser which is included with WxT. With all of these changes, the issue reported has been resolved, and now I can add images with entity_browser without any errors. I also merged your PR #33 for wxt_bootstrap to keep inline with upstream bootstrap changes, thanks for this!

I have just replaced 3 drupaloverrides in composer.json with their corresponding D11 versions. Now there are only two drupaloverrides remaining; layout_builder_st and toc_api.

smulvih2’s picture

Fixed issue reported by AAFC; media browser dialog in CKE5 is too small. This is caused by a CSS directive in claro, which sets the max-width to 500px. This has been fixed and set to 80% max-width, pushed to wxt_bootstrap 11.1.x.

smulvih2’s picture

Fix issue reported by HC; fontawesome plugin for CKE5 missing. I had to re-roll a fontawesome patch and udpate coms configs in WxT to get this working, as well as composer changes to automatically bring in the needed library (fontawesome/fontawesome). Byt default the text formats do not include this plugin, but after fresh install all you have to do is add the plugin to a text format and it should work same as CKE4.

  • smulvih2 committed 06e9b336 on 6.1.x
    Issue #3466676 by joseph.olstad, smulvih2: remove drupaloverrides in...

  • smulvih2 committed 7ef2f354 on 6.1.x
    Issue #3466676 @joseph.olstad @smulvih2: Fix wxt_ext_media to allow...

  • smulvih2 committed 5afda46c on 5.4.x
    Issue backport from #3466676 joseph.olstad smulvih2 - Fix entity_browser...
joseph.olstad’s picture

Relating to the fontawesome library , the namespace in packagist is actually forkawesome/font-awesome

https://packagist.org/packages/fortawesome/font-awesome

6.2 million installs

74,000+ stars

web247’s picture

Looks like this is in almost alpha state now, I'll do some tests myself (I'll install the 6.1.x-dev branch)

joseph.olstad’s picture

There's still two overrides plus the fontawesome/fontawesome bit that you'll need in your projects for upgrades. I also just openned a merge request for wxt_library to upgrade wet-boew from 4.0.83 to 4.0.85 (fixes a jQuery 4 compatibility issue we found).

smulvih2’s picture

@joseph I added the fontawesome library as a repository to site-wxt so it should work without any additional steps - https://github.com/drupalwxt/site-wxt/blob/384fb0d41e431f6c8cab13ef026bab630b8e560f/composer.json#L58. The two modules still pending D11 versions (layout_builder_st, toc_api) have the overrides needed in site-wxt, so should be able to use site-wxt 11.1.x to test the D11 upgrade without any additional entries in composer.

I will look at wxt_library now for the wet-boew upgrade, thanks!

@web247 will be good to get another set of eyes on the 6.1.x upgrade. We have it going through QA now with one of our projects, once we fix all the issues identified then we will push out an alpha release.

smulvih2’s picture

I added wet-boew/wet-boew 4.0.85 to drupalwxt/composer-extdeps - https://github.com/drupalwxt/composer-extdeps/commit/8690d2a46f15142707bbbd4884a3a90c24ca2831

Will test and merge your PR for wxt_library now.

smulvih2’s picture

Upgrading to 4.0.85 fixes the modal issue, so was able to remove our custom polyfill from wxt_library. PR merged and updated site-wxt accordingly.

joseph.olstad’s picture

Ok great, we could also look at upgrading gcweb to 16.2.0 from 14.6.0 at some point but less urgent.

web247’s picture

Ok guys, can anybody point me how to get the 6.1.x-dev release? This doesn't seem to work:

composer create-project drupalwxt/site-wxt:6.1.x-dev wxt61x --no-interaction
joseph.olstad’s picture

composer create-project drupalwxt/site-wxt:11.1.x-dev <site-name> --no-interaction

I got the answer from a documentation thread you are following.

There's a PR ready and waiting but it has to be merged.

from this issue:
#3506584-5: Add missing documentation in the official page

web247’s picture

StatusFileSize
new134.46 KB

Thanks @joseph.olstad , I'm just wondering if these "deprecated class constants" warning that I see when running upgrade_status against the wxt installation are worth to fix it at this point, I can provide a patch for this, but not sure if it's worth the time given that core version is 11.1.2 and D12 is not near at the corner yet:

Warnings - D12

joseph.olstad’s picture

ya that's Drupal 12 stuff, we have time to work on that, with that said, we can start working on those items.

We're focused right now mostly on immediate concerns relating to Drupal 11.

smulvih2’s picture

Just tested migrations for gcweb on 5.4.x and 6.1.x, both appear to be working as expected.

Some other things to test/fix

  • drupal/toc_api, remove drupaloverride in composer and get working with CKE5/D11
  • Test GCIntranet, ensure no JS errors and theme works as expected, with migrations
web247’s picture

StatusFileSize
new132.03 KB

I just ran the phpunit tests in the wxt profile (I am using 6.1.x), I came across this error (I saw this error on 5.4.x as well):

Schema Country Missing error

I do see the schema file in the codebase:

./html/profiles/wxt/modules/custom/wxt_core/config/install/wxt_core.settings.countries.yml

But perhaps it's not being created during the installation time? I had a look at the ./html/profiles/wxt/modules/custom/wxt_core/wxt_core.install and I can see the function wxt_core_update_8502() that loads the schema, perhaps this one is not being executed anymore during the installation time (that's my wild guess):

**
 * Issue #3399929: Change wxt_core countries config namespace.
 */
function wxt_core_update_8502() {
  $legacy = 'wxt_core_countries.settings';
  $updated = 'wxt_core.settings.countries';
  $config_factory = \Drupal::configFactory();
  $module_handler = \Drupal::service('module_handler');
  $module_path = $module_handler->getModule('wxt_core')->getPath();
  $path = DRUPAL_ROOT . '/' . $module_path . '/config/install/' . $updated . '.yml';
  $hasUpdated = $config_factory->get($legacy)->isNew();
  if ($hasUpdated) {
    $country_data = $config_factory->getEditable($legacy);
    $config = $config_factory->getEditable($updated);
    if (!is_array($country_data)) {
      // Update hook 8501 wasn't run correctly for some reason, or the yml was
      // deleted.
      wxt_core_update_8501();
      return;
    }
    $config->setData($country_data);
    $config->save();
    // Delete old data.
    $country_data->delete();
  }
  else {
    $country_data = Yaml::parse(\file_get_contents($path));
    $config = $config_factory->getEditable($updated);
    $config->setData($country_data);
    $config->save();
  }
}

web247’s picture

StatusFileSize
new459 bytes
new124.76 KB

I created a patch that basically supresses the error when running the unit tests, but it doesn't actually fix the countries schema not being loaded, I'll look on that later today, I might open a different issue page for that.

Tests after a patch

joseph.olstad’s picture

Thanks @web247

I've created an issue for that

#3508590: Countries test failure in a vanilla install

joseph.olstad’s picture

Status: Needs review » Fixed
Related issues: +#3510413: [META] - WxT 6.1.x -> 11.1.x

Linking the plan for WxT 6.1.0

Status: Fixed » Closed (fixed)

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