- 🇺🇸United States smustgrave
Could we get steps to reproduce this issue?
Also as a bug think this will need a test case
Thanks!
- 🇺🇸United States johns996 Marquette, MI
I think I ran into this issue when testing the Drupal 10.3 update on my sites. One of my sites kept generating an error on the drush updb step. Drush would generate the following error:
> [error] TypeError: array_diff(): Argument #2 must be of type array, null given in array_diff() (line 702 of /htdocs/Drupal/web/core/lib/Drupal/Core/Theme/Registry.php) #0 /htdocs/Drupal/web/core/lib/Drupal/Core/Theme/Registry.php(702): array_diff()
After applying the patch #2 I could get through the updb step with this single warning showing up:
[warning] Theme hook simple_menu_icons_css_item not found.
Looking through my sites I realized that the only site the error was showing up on was the one with the simple_menu_icons module enabled. So I rolled the site DB back, reverted the patch, uninstalled the module, and ran updb again. All the DB update applied and no errors were generated. I don't know if this helps with anything but I wanted to share my experience with this issue in the event is helps someone.
- 🇺🇸United States hummeldon
We've also encountered the same issues as outlined in #5 while testing Drupal 10.3. Patch #2 seemed to resolve the issue, but I believe the issue stems from something in the Bootstrap theme as mentioned in #1 and #2. I've experimented with switching to the core Olivero theme and the contrib Bootstrap5 theme and the issue wasn't present.
johns996, is your team using a sub-theme based on Bootstrap? If so, that may further confirm my suspicion and likely points to this issue needing to move over there instead of in Core.
- 🇺🇸United States johns996 Marquette, MI
hummeldon, yes this site is using the Bootstrap 3 theme.
After seeing your message I ran another set of tests on the site. I reset the DB again, made sure the module I thought was the culprit was enabled, and ran a drush updb. I got the same error I listed in #5 as expected. This time I kept the module installed and instead switched the default theme to Claro 10.3 and fully uninstalled the Bootstrap 3 (both my custom subtheme and the contrib theme). After changing the theme I ran drush updb and all of the database updates worked as expected. I still encountered the warning "Theme hook simple_menu_icons_css_item not found." related to the simple menu icons module but that was the same behavior I saw with the page from #2.
It looks to me like you're right, this is a Bootstrap issue, but one that only shows up when a theme hook is not found. Hope this helps.
- 🇳🇱Netherlands Summit
Hi,
I came to this thread because of the same issue. I have a bootstrap subtheme.
I solved it temporaly by 1) changing theme to Claro, 2) do drush updb 3) changing theme back to my theme Bizreview (Bootstrap theme)
How can I solve this structural?thanks, greetings,
- 🇨🇦Canada joseph.olstad
bootstrap 3.33 release solves the issue, rather than use the core patch I suggest upgrading to bootstrap 3.33
https://www.drupal.org/project/bootstrap/releases/8.x-3.33 →
- 🇧🇪Belgium borisson_ Mechelen, 🇧🇪
White this is really difficult to figure out how to trigger this without using any contrib. I seem to have the same issue when running database updates with drush when using a subtheme of the bootstrap theme. This breaks hard and gives an error I don't know how to pass.
The patch by @jungle works great to work around this issue and seems like a simple hardening of the code.
I updated steps to reproduce, but I'm not sure if they are enough or simpler to do. This is for a project where I didn't do the setup myself.
@smustgrave, you might know how we should proceed here? Using a contrib theme is the easiest way to reproduce the issue.
- 🇮🇳India mdsohaib4242
The error might be caused by a bug in version 8.x-3.25.
Update the Bootstrap theme to the latest stable versioncomposer require drupal/bootstrap:^3.26
- 🇨🇦Canada joseph.olstad
Ok thanks @mdsohaib4242
We're using the latest bootstrap version 3.34 and do not need this patch. I checked and I'm not using it.