Problem/Motivation
After updating drupalwxt/wxt from 5.2.3 to 5.3.0, database update throws error while running add_langcode_to_all_translatable_config database update.
Steps to reproduce
- Create a fresh new project using
drupalwxt/wxt-project:5.2.3.
composer create-project drupalwxt/wxt-project:5.2.3 site-wxt
- Install Drupal.
drush si
- Update
drupalwxt/wxt to 5.3.0
composer require drupalwxt/wxt:5.3.0 -W
- Update database
drush updb
Observe that add_langcode_to_all_translatable_config update fails with the following error:
--------------- ----------------------------------------------------- --------------- -------------------------------------------------------------------------------
Module Update ID Type Description
--------------- ----------------------------------------------------- --------------- -------------------------------------------------------------------------------
block_content 10300 hook_update_n 10300 - Apply index to reusable column.
locale 10300 hook_update_n 10300 - Add an index on locales_location on type and name.
taxonomy 10100 hook_update_n 10100 - Update entity definition to handle revision routes.
block_content revision_type post-update Update configuration for revision type.
editor sanitize_image_upload_settings post-update Clean up image upload settings.
filter consolidate_filter_config post-update Change filter_settings to type mapping.
node set_node_type_description_and_help_to_null post-update Converts empty `description` and `help` in content types to NULL.
system add_langcode_to_all_translatable_config post-update Adds a langcode to all simple config which needs it.
system amend_config_sync_readme_url post-update Fix path in README.txt in CONFIG_SYNC_DIRECTORY.
system convert_empty_country_and_timezone_settings_to_null post-update Updates system.date config to NULL for empty country and timezone defaults.
system mail_notification_setting post-update Adds default value for the mail_notification config parameter.
system move_development_settings_to_keyvalue post-update Move development settings from state to raw key-value storage.
system set_cron_logging_setting_to_boolean post-update Fix system.cron:logging values to boolean.
taxonomy set_new_revision post-update Re-save Taxonomy configurations with new_revision config.
taxonomy set_vocabulary_description_to_null post-update Converts empty `description` in vocabularies to NULL.
views pager_heading post-update Adds a default pager heading.
views rendered_entity_field_cache_metadata post-update Removes entity display cache metadata from views with rendered entity fields.
views views_data_argument_plugin_id post-update Post update configured views for entity reference argument plugin IDs.
--------------- ----------------------------------------------------- --------------- -------------------------------------------------------------------------------
Do you wish to run the specified pending updates? (yes/no) [yes]:
>
> [notice] Update started: block_content_update_10300
> [notice] Update completed: block_content_update_10300
> [notice] Update started: locale_update_10300
> [notice] Update completed: locale_update_10300
> [notice] Update started: taxonomy_update_10100
> [notice] Added revision routes to Taxonomy Term entity type.
> [notice] Update completed: taxonomy_update_10100
> [notice] Update started: block_content_post_update_revision_type
> [notice] Update completed: block_content_post_update_revision_type
> [notice] Update started: editor_post_update_sanitize_image_upload_settings
> [notice] Update completed: editor_post_update_sanitize_image_upload_settings
> [notice] Update started: filter_post_update_consolidate_filter_config
> [notice] Update completed: filter_post_update_consolidate_filter_config
> [notice] Update started: node_post_update_set_node_type_description_and_help_to_null
> [notice] Update completed: node_post_update_set_node_type_description_and_help_to_null
> [notice] Update started: system_post_update_add_langcode_to_all_translatable_config
> [notice] Processed 50 items of 213.
> [notice] Processed 100 items of 213.
> [notice] Processed 150 items of 213.
> [notice] Processed 200 items of 213.
> [error] AssertionError: Failed on config name 'wxt_core.versions' in assert() (line 264 of /var/www/html/html/core/modules/system/system.post_update.php) #0 /var/www/html/html/core/modules/system/system.post_update.php(264): assert(false, 'Failed on confi...')
> #1 /var/www/html/vendor/drush/drush/src/Commands/core/UpdateDBCommands.php(280): system_post_update_add_langcode_to_all_translatable_config(Array)
> #2 /var/www/html/vendor/drush/drush/includes/batch.inc(257): Drush\Commands\core\UpdateDBCommands::updateDoOnePostUpdate('system_post_upd...', Array)
> #3 /var/www/html/vendor/drush/drush/includes/batch.inc(204): _drush_batch_worker()
> #4 /var/www/html/vendor/drush/drush/includes/batch.inc(75): _drush_batch_command('1')
> #5 /var/www/html/vendor/drush/drush/src/Commands/core/UpdateDBCommands.php(136): drush_batch_command('1')
> #6 [internal function]: Drush\Commands\core\UpdateDBCommands->process('1', Array)
> #7 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(276): call_user_func_array(Array, Array)
> #8 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(212): Consolidation\AnnotatedCommand\CommandProcessor->runCommandCallback(Array, Object(Consolidation\AnnotatedCommand\CommandData))
> #9 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(176): Consolidation\AnnotatedCommand\CommandProcessor->validateRunAndAlter(Array, Array, Object(Consolidation\AnnotatedCommand\CommandData))
> #10 /var/www/html/vendor/consolidation/annotated-command/src/AnnotatedCommand.php(391): Consolidation\AnnotatedCommand\CommandProcessor->process(Object(Symfony\Component\Console\Output\ConsoleOutput), Array, Array, Object(Consolidation\AnnotatedCommand\CommandData))
> #11 /var/www/html/vendor/symfony/console/Command/Command.php(326): Consolidation\AnnotatedCommand\AnnotatedCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
> #12 /var/www/html/vendor/symfony/console/Application.php(1096): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
> #13 /var/www/html/vendor/symfony/console/Application.php(324): Symfony\Component\Console\Application->doRunCommand(Object(Consolidation\AnnotatedCommand\AnnotatedCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
> #14 /var/www/html/vendor/symfony/console/Application.php(175): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
> #15 /var/www/html/vendor/drush/drush/src/Runtime/Runtime.php(110): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
> #16 /var/www/html/vendor/drush/drush/src/Runtime/Runtime.php(40): Drush\Runtime\Runtime->doRun(Array, Object(Symfony\Component\Console\Output\ConsoleOutput))
> #17 /var/www/html/vendor/drush/drush/drush.php(139): Drush\Runtime\Runtime->run(Array)
> #18 /var/www/html/vendor/drush/drush/drush(4): require('/var/www/html/v...')
> #19 /var/www/html/vendor/bin/drush(119): include('/var/www/html/v...')
> #20 {main}.
> AssertionError: Failed on config name 'wxt_core.versions' in /var/www/html/html/core/modules/system/system.post_update.php on line 264 #0 /var/www/html/html/core/modules/system/system.post_update.php(264): assert(false, 'Failed on confi...')
> #1 /var/www/html/vendor/drush/drush/src/Commands/core/UpdateDBCommands.php(280): system_post_update_add_langcode_to_all_translatable_config(Array)
> #2 /var/www/html/vendor/drush/drush/includes/batch.inc(257): Drush\Commands\core\UpdateDBCommands::updateDoOnePostUpdate('system_post_upd...', Array)
> #3 /var/www/html/vendor/drush/drush/includes/batch.inc(204): _drush_batch_worker()
> #4 /var/www/html/vendor/drush/drush/includes/batch.inc(75): _drush_batch_command('1')
> #5 /var/www/html/vendor/drush/drush/src/Commands/core/UpdateDBCommands.php(136): drush_batch_command('1')
> #6 [internal function]: Drush\Commands\core\UpdateDBCommands->process('1', Array)
> #7 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(276): call_user_func_array(Array, Array)
> #8 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(212): Consolidation\AnnotatedCommand\CommandProcessor->runCommandCallback(Array, Object(Consolidation\AnnotatedCommand\CommandData))
> #9 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(176): Consolidation\AnnotatedCommand\CommandProcessor->validateRunAndAlter(Array, Array, Object(Consolidation\AnnotatedCommand\CommandData))
> #10 /var/www/html/vendor/consolidation/annotated-command/src/AnnotatedCommand.php(391): Consolidation\AnnotatedCommand\CommandProcessor->process(Object(Symfony\Component\Console\Output\ConsoleOutput), Array, Array, Object(Consolidation\AnnotatedCommand\CommandData))
> #11 /var/www/html/vendor/symfony/console/Command/Command.php(326): Consolidation\AnnotatedCommand\AnnotatedCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
> #12 /var/www/html/vendor/symfony/console/Application.php(1096): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
> #13 /var/www/html/vendor/symfony/console/Application.php(324): Symfony\Component\Console\Application->doRunCommand(Object(Consolidation\AnnotatedCommand\AnnotatedCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
> #14 /var/www/html/vendor/symfony/console/Application.php(175): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
> #15 /var/www/html/vendor/drush/drush/src/Runtime/Runtime.php(110): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
> #16 /var/www/html/vendor/drush/drush/src/Runtime/Runtime.php(40): Drush\Runtime\Runtime->doRun(Array, Object(Symfony\Component\Console\Output\ConsoleOutput))
> #17 /var/www/html/vendor/drush/drush/drush.php(139): Drush\Runtime\Runtime->run(Array)
> #18 /var/www/html/vendor/drush/drush/drush(4): require('/var/www/html/v...')
> #19 /var/www/html/vendor/bin/drush(119): include('/var/www/html/v...')
> #20 {main}
> [warning] Drush command terminated abnormally.
In ProcessBase.php line 171:
Unable to decode output into JSON: Syntax error
AssertionError: Failed on config name 'wxt_core.versions' in assert() (line 264 of /var/www/html/html/core/modules/system/system.post_update.php).
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Comments
Comment #2
druplr commentedComment #3
druplr commentedHere is a patch to fix the issue.
Comment #4
druplr commentedComment #5
sylus commentedThank you so much for this fix @druplr!
Committed and attributed!
Comment #6
joseph.olstadFolks, the wxt versions regression is explained and fixed by the changes @smulvih2 pushed up 3 days ago. I tested the fix the exact same day and it works. Please read the related issue summary for a full explanation.
#3490685: wxt versions crashes on upgrades since admin_toolbar_links_access_filter is deprecated for Drupal 10.3+
I'm guessing that the patch in #3 should be reverted as it is not necessary and was an incomplete understanding of the issue that is actually caused by an upstream deprecation (admin_toolbar dependency admin_toolbar_links_access_filter being no longer installable) that made it impossible to install wxt_admin. We fixed this on december 19th.
https://github.com/drupalwxt/wxt/commit/37493183c3917c1b98801714f80a8f13...
Please revert https://github.com/drupalwxt/wxt/commit/82b12b6cd369eacb2a3da497d00fdad9...
Comment #7
joseph.olstadPlease read my comment above
Comment #8
joseph.olstadThis error is fixed by removing the deprecated dependency that had a bad consequence of preventing wxt_admin from being installed (is force due to missing dependency and deprecation of a removed sub module previously found in the admin_toolbar module). We have fixed this in another seperate commit. Therefore the change made with this issue is actually not needed and very likely should be reverted.
Comment #9
web247 commentedComment #10
smulvih2Fixed by parent issue, thanks!