Mismatched views area handler config key and plugin ID causes TypeError on some sites with language overrides

Created on 30 October 2024, about 2 months ago

Problem/Motivation

πŸ› Do not use basic_html text format Needs review updated the views area handler plugin to use TextCustom but did not update the config key to match. This causes the following error under certain conditions:

TypeError: Drupal\locale\LocaleConfigManager::filterOverride(): Argument #2 ($translatable) must be of type array, Drupal\Core\StringTranslation\TranslatableMarkup given, called in /var/www/html/docroot/core/modules/locale/src/LocaleConfigManager.php on line 637 in /var/www/html/docroot/core/modules/locale/src/LocaleConfigManager.php on line 630 #0 /var/www/html/docroot/core/modules/locale/src/LocaleConfigManager.php(637): Drupal\locale\LocaleConfigManager->filterOverride()
#1 /var/www/html/docroot/core/modules/locale/src/LocaleConfigManager.php(637): Drupal\locale\LocaleConfigManager->filterOverride()
#2 /var/www/html/docroot/core/modules/locale/src/LocaleConfigManager.php(637): Drupal\locale\LocaleConfigManager->filterOverride()
#3 /var/www/html/docroot/core/modules/locale/src/LocaleConfigManager.php(637): Drupal\locale\LocaleConfigManager->filterOverride()
#4 /var/www/html/docroot/core/modules/locale/src/LocaleConfigManager.php(637): Drupal\locale\LocaleConfigManager->filterOverride()
#5 /var/www/html/docroot/core/modules/locale/src/LocaleConfigManager.php(637): Drupal\locale\LocaleConfigManager->filterOverride()
#6 /var/www/html/docroot/core/modules/locale/src/LocaleConfigManager.php(587): Drupal\locale\LocaleConfigManager->filterOverride()
#7 /var/www/html/docroot/core/modules/locale/locale.bulk.inc(639): Drupal\locale\LocaleConfigManager->updateConfigTranslations()
#8 /var/www/html/docroot/core/includes/batch.inc(296): locale_config_batch_refresh_name()
#9 /var/www/html/docroot/core/includes/form.inc(977): _batch_process()
#10 /var/www/html/docroot/core/includes/install.core.inc(654): batch_process()
#11 /var/www/html/docroot/core/includes/install.core.inc(572): install_run_task()
#12 /var/www/html/docroot/core/includes/install.core.inc(121): install_run_tasks()
#13 /var/www/html/vendor/drush/drush/includes/drush.inc(69): install_drupal()
#14 /var/www/html/vendor/drush/drush/includes/drush.inc(53): drush_call_user_func_array()
#15 /var/www/html/vendor/drush/drush/src/Commands/core/SiteInstallCommands.php(167): drush_op()
#16 [internal function]: Drush\Commands\core\SiteInstallCommands->install()
#17 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(276): call_user_func_array()
#18 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(212): Consolidation\AnnotatedCommand\CommandProcessor->runCommandCallback()
#19 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(175): Consolidation\AnnotatedCommand\CommandProcessor->validateRunAndAlter()
#20 /var/www/html/vendor/consolidation/annotated-command/src/AnnotatedCommand.php(387): Consolidation\AnnotatedCommand\CommandProcessor->process()
#21 /var/www/html/vendor/symfony/console/Command/Command.php(326): Consolidation\AnnotatedCommand\AnnotatedCommand->execute()
#22 /var/www/html/vendor/symfony/console/Application.php(1096): Symfony\Component\Console\Command\Command->run()
#23 /var/www/html/vendor/symfony/console/Application.php(324): Symfony\Component\Console\Application->doRunCommand()
#24 /var/www/html/vendor/symfony/console/Application.php(175): Symfony\Component\Console\Application->doRun()
#25 /var/www/html/vendor/drush/drush/src/Runtime/Runtime.php(110): Symfony\Component\Console\Application->run()
#26 /var/www/html/vendor/drush/drush/src/Runtime/Runtime.php(40): Drush\Runtime\Runtime->doRun()
#27 /var/www/html/vendor/drush/drush/drush.php(139): Drush\Runtime\Runtime->run()
#28 /var/www/html/vendor/drush/drush/drush(4): require('...')
#29 /var/www/html/vendor/bin/drush(119): include('...')
#30 {main}

Steps to reproduce

I have been unable to reproduce this on a clean Drupal 10.3.6 site, but it seems like it requires a config language override for one of the default views that is structured using the old "area" plugin.

Proposed resolution

Update the views in the optional config to use "area_text_custom" for both the config key and the plugin ID.

Remaining tasks

Determine whether there are any side-effects of this change, which should only affect sites where the module was not already installed.

User interface changes

None

API changes

None

Data model changes

None

πŸ› Bug report
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States byrond

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024