Hello all,
A routine database update from Drupal 11.2.1 to 1.2.2 fails because of some Block Module misconfiguration:
Here is the error message on Drush :
[error] Update aborted by: block_post_update_set_menu_block_depth_to_null_if_zero
Error message when attempting the update on the front end :
module block
Update set_menu_block_depth_to_null_if_zero
Error : InvalidArgumentException : $string ("1") must be a string. in Drupal\Core\StringTranslation\TranslatableMarkup->__construct() (ligne 132 de /home/accountname/public_html/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php).
Is there anything I can fix directly in the database? Thanks!
Comments
Comment #2
mediameriquat commentedOne possible solution is to uninstall faulty blocks from your theme, perform the upgrade, and reinstall the blocks.
In my case, the culprit was the Main Menu block. My site is quite old and was updated from 8 > 11, so it seems there is a problem with "legacy" menus.
Comment #3
bart lambert commentedIn my case, I used adaptieve theme in D10. I thought by fixing the issues manually i would be able to use this theme in D11.
I had to remove all the installed themes before being able to run updb succesfully!
To bad AT-theme is not updating to D11
Comment #4
longwaveIs it possible to get a full stack trace from where that exception happens? The update hook itself doesn't use TranslatableMarkup so it's not clear to me how or why this happens.
Comment #5
mediameriquat commented@Bart Lambert
Interesting... I am also using AdaptiveTheme on that particular website. Although v. 7.1.1 is marked compatible with Drupal 11, this may be a theme-specific issue.
Comment #6
ralfmattheus commentedHi @longwave
It would be great if you could have a look at this issue.
Here is the information I can provide:
Drupal-versie 11.2.2
PHP 8.3.22
Database 10.6.22-MariaDB-cll-lve-log
at_tool 3.1.2 AdaptiveTheme
Comment #7
ralfmattheus commentedThis morning I tried the database update script again, but it gives the same error as before.