Closed (duplicate)
Project:
Metatag
Version:
2.2.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
27 Oct 2026 at 10:35 UTC
Updated:
27 Oct 2026 at 13:39 UTC
Jump to comment: Most recent
My pipelines updated to the new patch release and run into this error when executing v2_06_error_page_defaults post update hook.
The stack trace:
TypeError: htmlspecialchars(): Argument #1 ($string) must be of type string, array given in htmlspecialchars() (line 440 of /var/www/html/web/core/lib/Drupal/Component/Utility/Html.php) #0 /var/www/html/web/core/lib/Drupal/Component/Utility/Html.php(440): htmlspecialchars(Array, 11, 'UTF-8')
> #1 /var/www/html/web/core/lib/Drupal/Component/Render/FormattableMarkup.php(268): Drupal\Component\Utility\Html::escape(Array)
> #2 /var/www/html/web/core/lib/Drupal/Component/Render/FormattableMarkup.php(217): Drupal\Component\Render\FormattableMarkup::placeholderEscape(Array)
> #3 /var/www/html/web/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php(195): Drupal\Component\Render\FormattableMarkup::placeholderFormat('The Metatag con...', Array)
> #4 /var/www/html/web/core/lib/Drupal/Component/Utility/ToStringTrait.php(15): Drupal\Core\StringTranslation\TranslatableMarkup->render()
> #5 /var/www/html/vendor/drush/drush/src/Commands/core/UpdateDBCommands.php(330): Drupal\Core\StringTranslation\TranslatableMarkup->__toString()
> #6 /var/www/html/vendor/drush/drush/includes/batch.inc(259): Drush\Commands\core\UpdateDBCommands::updateDoOnePostUpdate('metatag_post_up...', Array)
> #7 /var/www/html/vendor/drush/drush/includes/batch.inc(205): _drush_batch_worker()
> #8 /var/www/html/vendor/drush/drush/includes/batch.inc(76): _drush_batch_command('418')
> #9 /var/www/html/vendor/drush/drush/src/Commands/core/UpdateDBCommands.php(145): drush_batch_command('418')
> #10 [internal function]: Drush\Commands\core\UpdateDBCommands->process('418', Array)
> #11 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(276): call_user_func_array(Array, Array)
> #12 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(212): Consolidation\AnnotatedCommand\CommandProcessor->runCommandCallback(Array, Object(Consolidation\AnnotatedCommand\CommandData))
> #13 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(175): Consolidation\AnnotatedCommand\CommandProcessor->validateRunAndAlter(Array, Array, Object(Consolidation\AnnotatedCommand\CommandData))
> #14 /var/www/html/vendor/consolidation/annotated-command/src/AnnotatedCommand.php(389): Consolidation\AnnotatedCommand\CommandProcessor->process(Object(Symfony\Component\Console\Output\ConsoleOutput), Array, Array, Object(Consolidation\AnnotatedCommand\CommandData))
> #15 /var/www/html/vendor/symfony/console/Command/Command.php(326): Consolidation\AnnotatedCommand\AnnotatedCommand->execute(Object(Drush\Symfony\LessStrictArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
> #16 /var/www/html/vendor/symfony/console/Application.php(1129): Symfony\Component\Console\Command\Command->run(Object(Drush\Symfony\LessStrictArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
> #17 /var/www/html/vendor/drush/drush/src/Application.php(201): Symfony\Component\Console\Application->doRunCommand(Object(Consolidation\AnnotatedCommand\AnnotatedCommand), Object(Drush\Symfony\LessStrictArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
> #18 /var/www/html/vendor/symfony/console/Application.php(325): Drush\Application->doRunCommand(Object(Consolidation\AnnotatedCommand\AnnotatedCommand), Object(Drush\Symfony\LessStrictArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
> #19 /var/www/html/vendor/symfony/console/Application.php(176): Symfony\Component\Console\Application->doRun(Object(Drush\Symfony\LessStrictArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
> #20 /var/www/html/vendor/drush/drush/src/Runtime/Runtime.php(113): Symfony\Component\Console\Application->run(Object(Drush\Symfony\LessStrictArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
> #21 /var/www/html/vendor/drush/drush/src/Runtime/Runtime.php(40): Drush\Runtime\Runtime->doRun(Array, Object(Symfony\Component\Console\Output\ConsoleOutput))
> #22 /var/www/html/vendor/drush/drush/drush.php(140): Drush\Runtime\Runtime->run(Array)
> #23 /var/www/html/vendor/bin/drush.php(119): include('/var/www/html/v...')
> #24 {main}.
Comments
Comment #2
eduardo morales albertiDuplicated issue, fix already on#3633443: Error on metatag_post_update_v2_06_error_page_defaultsComment #3
eduardo morales albertiSorry, it could be related, but it is not the same error.
Could you test if the change solves your issue?
Comment #4
eduardo morales albertiSame issue, but a different Drupal core version probably
Comment #5
jurgenhaasConfirmed, that patch from the other issue fixes this one too.
Comment #6
damienmckennafacepalm.gif
Sorry about that.
Yes, this is a dupe of #3633443: Error on metatag_post_update_v2_06_error_page_defaults.