- 🇺🇸United States AaronBauman Philadelphia
Not clear to me what the issue is either, but the suggested fix of removing the offending twig files fixed it for me as well.
Here's a related core issue, though not clear that it's actually a core problem or how to recreate with only core: 🐛 array_diff(): Argument #2 must be of type array, null given in array_diff() (line 702 [...] core/lib/Drupal/Core/Theme/Registry.php) Postponed: needs info
I will open a MR with the suggested fix as a temporary workaround.
- Merge request !44Issue #3460442 by AaronBauman: Removes offending template files to fix fatal... → (Merged) created by AaronBauman
- Status changed to Needs review
5 months ago 5:26pm 11 July 2024 - First commit to issue fork.
-
shelane →
committed a8280622 on 8.x-3.x authored by
AaronBauman →
Issue #3460442 by AaronBauman, derekthatcher: Cannot run update.php
-
shelane →
committed a8280622 on 8.x-3.x authored by
AaronBauman →
- 🇮🇳India akki123
In my case, removing this file bootstrap/templates/block/block.html.twig
resolved the update.php issue. - 🇮🇳India akki123
In the end, it boils down to my custom theme hook implementation.
customTheme_preprocess_block__BlockID()
I removed that and update.php works. - Status changed to Fixed
4 months ago 10:27pm 11 August 2024 - 🇳🇿New Zealand RoSk0 Wellington
Marking as fixed as this was released in the 8.x-3.32 → and fixed the issue for me - tested on the latest Drupal core 10.3.2.
Remove file generate error : Twig\Error\LoaderError: Template "themes/contrib/bootstrap/templates/block/block--system-menu-block--main.html.twig" is not defined.
- Status changed to Active
4 months ago 12:08pm 25 August 2024 - 🇦🇷Argentina cesarmiquel
I also experienced this issue and noticed the problem was the same as in comment #8: by commenting out the
theme__preprocess_block__simple_block(&$variables)
in the custom theme, rebuilding registry and I was able to run the update without problems. I don't think deleting templates is the correct way to fix this. I would recommend looking into your.theme
file. - 🇬🇧United Kingdom alexj12
Encountered this issue after upgrading a site from 10.2.x to 10.3.x which included bumping this theme to 3.32.
Even down to trying out the previous advice 'In my case, removing this file bootstrap/templates/block/block.html.twig
resolved the update.php issue.' which worked, but I wasn't too keen on that as a permanent fix.I'm entirely sure that all composer commands were run successfully when the issue occurred, but I simply re-ran `composer require 'drupal/bootstrap:^3.32', composer re-evaluated and regenerated a number of autoload files and following that database updates ran successfully. The issue seems to be resolved for the site that was affected.
This might sound like I missed something, and maybe I did, but I haven't been able to track down what. May just be worth a try as a first pass if anyone else runs into this issue.
- 🇨🇦Canada joseph.olstad
Thanks for the feedback.
Others may encounter this issue and your comment will assist them in surmounting it.
FYI: A new Drupal 11 compatible release has been tagged today 8.x-3.33-rc1 →
Automatically closed - issue fixed for 2 weeks with no activity.