Problem/Motivation
Installation is successful, crashes when enabling it:
TypeError: htmlspecialchars(): Argument #1 ($string) must be of type string, array given in htmlspecialchars() (line 437 of /chroot/home/aab0448d/86038db258.nxcli.io/html/core/lib/Drupal/Component/Utility/Html.php).
I see one simile issue reported here:
Crash in module installer if a dependency is missing
🐛
Crash in module installer if a dependency is missing
Active
. This issue labeled as fixed, but didn't say how and which dependency module was missing. I went to the link provided in that topic, didn't find any clue. So I posted my problem here asking for help. Apologize for not understanding well on that issue.
My core is Drupal 10.2.1.
Steps to reproduce
Below is the error log message:
#0 /chroot/home/aab0448d/86038db258.nxcli.io/html/core/lib/Drupal/Component/Utility/Html.php(437): htmlspecialchars(Array, 11, 'UTF-8')
#1 /chroot/home/aab0448d/86038db258.nxcli.io/html/core/lib/Drupal/Component/Render/FormattableMarkup.php(268): Drupal\Component\Utility\Html::escape(Array)
#2 /chroot/home/aab0448d/86038db258.nxcli.io/html/core/lib/Drupal/Component/Render/FormattableMarkup.php(217): Drupal\Component\Render\FormattableMarkup::placeholderEscape(Array)
#3 /chroot/home/aab0448d/86038db258.nxcli.io/html/core/lib/Drupal/Core/StringTranslation/TranslatableMarkup.php(195): Drupal\Component\Render\FormattableMarkup::placeholderFormat('@requirements_m...', Array)
#4 /chroot/home/aab0448d/86038db258.nxcli.io/html/core/lib/Drupal/Component/Utility/ToStringTrait.php(15): Drupal\Core\StringTranslation\TranslatableMarkup->render()
#5 /chroot/home/aab0448d/86038db258.nxcli.io/html/core/lib/Drupal/Core/Messenger/Messenger.php(54): Drupal\Core\StringTranslation\TranslatableMarkup->__toString()
#6 /chroot/home/aab0448d/86038db258.nxcli.io/html/core/lib/Drupal/Core/Messenger/Messenger.php(46): Drupal\Core\Messenger\Messenger->addMessage(Object(Drupal\Core\StringTranslation\TranslatableMarkup), 'error', false)
#7 /chroot/home/aab0448d/86038db258.nxcli.io/html/core/includes/install.inc(967): Drupal\Core\Messenger\Messenger->addError(Object(Drupal\Core\StringTranslation\TranslatableMarkup))
#8 /chroot/home/aab0448d/86038db258.nxcli.io/html/core/modules/system/src/Form/ModulesListForm.php(463): drupal_check_module('symfony_mailer')
#9 /chroot/home/aab0448d/86038db258.nxcli.io/html/core/modules/system/src/Form/ModulesListForm.php(481): Drupal\system\Form\ModulesListForm->buildModuleList(Object(Drupal\Core\Form\FormState))
#10 [internal function]: Drupal\system\Form\ModulesListForm->submitForm(Array, Object(Drupal\Core\Form\FormState))
#11 /chroot/home/aab0448d/86038db258.nxcli.io/html/core/lib/Drupal/Core/Form/FormSubmitter.php(129): call_user_func_array(Array, Array)
#12 /chroot/home/aab0448d/86038db258.nxcli.io/html/core/lib/Drupal/Core/Form/FormSubmitter.php(67): Drupal\Core\Form\FormSubmitter->executeSubmitHandlers(Array, Object(Drupal\Core\Form\FormState))
#13 /chroot/home/aab0448d/86038db258.nxcli.io/html/core/lib/Drupal/Core/Form/FormBuilder.php(597): Drupal\Core\Form\FormSubmitter->doSubmitForm(Array, Object(Drupal\Core\Form\FormState))
#14 /chroot/home/aab0448d/86038db258.nxcli.io/html/core/lib/Drupal/Core/Form/FormBuilder.php(325): Drupal\Core\Form\FormBuilder->processForm('system_modules', Array, Object(Drupal\Core\Form\FormState))
#15 /chroot/home/aab0448d/86038db258.nxcli.io/html/core/lib/Drupal/Core/Controller/FormController.php(73): Drupal\Core\Form\FormBuilder->buildForm(Object(Drupal\system\Form\ModulesListForm), Object(Drupal\Core\Form\FormState))
#16 [internal function]: Drupal\Core\Controller\FormController->getContentResult(Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\RouteMatch))
#17 /chroot/home/aab0448d/86038db258.nxcli.io/html/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array)
#18 /chroot/home/aab0448d/86038db258.nxcli.io/html/core/lib/Drupal/Core/Render/Renderer.php(627): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#19 /chroot/home/aab0448d/86038db258.nxcli.io/html/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
#20 /chroot/home/aab0448d/86038db258.nxcli.io/html/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array)
#21 /chroot/home/aab0448d/86038db258.nxcli.io/html/vendor/symfony/http-kernel/HttpKernel.php(181): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#22 /chroot/home/aab0448d/86038db258.nxcli.io/html/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#23 /chroot/home/aab0448d/86038db258.nxcli.io/html/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#24 /chroot/home/aab0448d/86038db258.nxcli.io/html/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#25 /chroot/home/aab0448d/86038db258.nxcli.io/html/core/lib/Drupal/Core/StackMiddleware/ContentLength.php(28): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#26 /chroot/home/aab0448d/86038db258.nxcli.io/html/core/modules/big_pipe/src/StackMiddleware/ContentLength.php(32): Drupal\Core\StackMiddleware\ContentLength->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#27 /chroot/home/aab0448d/86038db258.nxcli.io/html/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\big_pipe\StackMiddleware\ContentLength->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#28 /chroot/home/aab0448d/86038db258.nxcli.io/html/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#29 /chroot/home/aab0448d/86038db258.nxcli.io/html/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#30 /chroot/home/aab0448d/86038db258.nxcli.io/html/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#31 /chroot/home/aab0448d/86038db258.nxcli.io/html/core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php(36): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#32 /chroot/home/aab0448d/86038db258.nxcli.io/html/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\AjaxPageState->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#33 /chroot/home/aab0448d/86038db258.nxcli.io/html/core/lib/Drupal/Core/DrupalKernel.php(704): Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#34 /chroot/home/aab0448d/86038db258.nxcli.io/html/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#35 {main}
Proposed resolution
If dependency modules are required for installation and the reasons for the crash, could they be listed in the module page?
Remaining tasks
User interface changes
API changes
Data model changes