Problem/Motivation
Warning: Array to string conversion in Drupal\Core\Render\Markup::create() (line 36 of core/lib/Drupal/Component/Render/MarkupTrait.php).
Drupal\Core\Render\Markup::create(Array) (Line: 41)
html_titles_preprocess_block(Array, 'block', Array)
call_user_func_array('html_titles_preprocess_block', Array) (Line: 287)
Drupal\Core\Theme\ThemeManager->render('block', Array) (Line: 422)
Drupal\Core\Render\Renderer->doRender(Array) (Line: 435)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 201)
Drupal\Core\Render\Renderer->render(Array) (Line: 479)
Drupal\Core\Template\TwigExtension->escapeFilter(Object, Array, 'html', NULL, 1) (Line: 51)
__TwigTemplate_d9bec94492b2424f341b9272bc33204312041e12ac3928c8731c7757eb947019->doDisplay(Array, Array) (Line: 405)
Twig\Template->displayWithErrorHandling(Array, Array) (Line: 378)
Twig\Template->display(Array) (Line: 390)
Twig\Template->render(Array) (Line: 55)
twig_render_template('modules/contrib/ds/templates/ds-1col.html.twig', Array) (Line: 384)
Drupal\Core\Theme\ThemeManager->render('ds_1col', Array) (Line: 422)
Drupal\Core\Render\Renderer->doRender(Array) (Line: 435)
Drupal\Core\Render\Renderer->doRender(Array) (Line: 435)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 201)
Drupal\Core\Render\Renderer->render(Array) (Line: 479)
Drupal\Core\Template\TwigExtension->escapeFilter(Object, Array, 'html', NULL, 1) (Line: 111)
__TwigTemplate_a39d6fc17455f2608c26d1a3c25c510eec9bb459200d1935ff87b24a451770bd->doDisplay(Array, Array) (Line: 405)
Twig\Template->displayWithErrorHandling(Array, Array) (Line: 378)
Twig\Template->display(Array) (Line: 390)
Twig\Template->render(Array) (Line: 55)
twig_render_template('themes/custom/proto/templates/content/node.html.twig', Array) (Line: 384)
Drupal\Core\Theme\ThemeManager->render('node', Array) (Line: 422)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 201)
Drupal\Core\Render\Renderer->render(Array, ) (Line: 241)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 564)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 242)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 132)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
call_user_func(Array, Object, 'kernel.view', Object) (Line: 142)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object, 'kernel.view') (Line: 163)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 80)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 709)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
Steps to reproduce
Enable module
Drupal Version 9.4.5
PHP Version 8.0.21
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | patch-issue-3302589.patch | 808 bytes | Dharmendra.s |
Comments
Comment #2
almador commentedSame problem here, but the error message looks little bit differ:
Warning: Array to string conversion in Drupal\Core\Render\Markup::create() (line 36 of core/lib/Drupal/Component/Render/MarkupTrait.php).My setup is:
Drupal 9.5.1
HTML Titles for Drupal 8 - 8.x-1.0-alpha2
Comment #3
Dharmendra.s commentedNot able to reproduce. what is the exact flow to get that error, during node|block|taxonomy save.
My setup is:
Drupal : 9.4.8
PHP : 8.0.26
Mysql : 5.7.29
Comment #4
almador commentedHere is the full error code:
Comment #5
almador commentedI'm not sure, but maybe in html_titles.module
should be replaced with:
drupal-check
Comment #6
almador commentedalso when I'm trying to access the
/admin/structure/views/view/taxonomy_termthe error appears:
TypeError: array_key_exists(): Argument #2 ($array) must be of type array, Drupal\Core\StringTranslation\TranslatableMarkup given in html_titles_preprocess_page_title() (line 52 of modules/contrib/html_titles/html_titles.module).Comment #7
Dharmendra.s commentedYes it was throwing the error on /admin/structure/views/view/taxonomy_term page , I update the code and working fine for me.
Please review the patch.
Comment #8
almador commentedDharmendra.s thank you for the patch, I could confirm it's working
Comment #9
i-trokhanenkoComment #11
i-trokhanenkoThanks!