- Issue created by @Maeglin
- 🇺🇸United States corE
- Drupal Version 10.3.1
- PHP 8.3.9
- Schema.org Metatag 3.0.2 (updated today)
I'm getting an error message trying to edit content pages. I think it's related to this issue... my error wording is a little different...
(I did make some metatag changes the other day so I'm not sure if it's related to that or the update today ??)The website encountered an unexpected error. Try again later.
Error: Cannot use object of type Drupal\Core\StringTranslation\TranslatableMarkup as array in Drupal\Core\Render\Renderer->doRender() (line 269 of core/lib/Drupal/Core/Render/Renderer.php).
Drupal\Core\Render\Renderer->render() (Line: 165)
Drupal\Core\Render\Renderer->Drupal\Core\Render\{closure}() (Line: 638)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 164)
Drupal\Core\Render\Renderer->renderInIsolation() (Line: 174)
Drupal\Core\Render\Renderer->renderPlain() (Line: 125)
Drupal\schema_metatag\Plugin\schema_metatag\PropertyType\BreadcrumbList->getItems() (Line: 48)
Drupal\schema_metatag\Plugin\schema_metatag\PropertyType\ItemListElement->outputValue() (Line: 94)
Drupal\schema_metatag\Plugin\schema_metatag\PropertyType\BreadcrumbList->outputValue() (Line: 206)
Drupal\schema_metatag\Plugin\metatag\Tag\SchemaNameBase->outputValue() (Line: 179)
Drupal\schema_metatag\Plugin\metatag\Tag\SchemaNameBase->output() (Line: 634)
Drupal\metatag\MetatagManager->generateRawElements() (Line: 61)
Drupal\metatag\Plugin\Field\MetatagEntityFieldItemList::Drupal\metatag\Plugin\Field\{closure}() (Line: 638)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 48)
Drupal\metatag\Plugin\Field\MetatagEntityFieldItemList->computeValue() (Line: 32)
Drupal\metatag\Plugin\Field\MetatagEntityFieldItemList->ensureComputedValue() (Line: 114)
Drupal\metatag\Plugin\Field\MetatagEntityFieldItemList->isEmpty() (Line: 162)
Drupal\Core\TypedData\Validation\RecursiveContextualValidator->validateNode() (Line: 164)
Drupal\Core\TypedData\Validation\RecursiveContextualValidator->validateNode() (Line: 106)
Drupal\Core\TypedData\Validation\RecursiveContextualValidator->validate() (Line: 93)
Drupal\Core\TypedData\Validation\RecursiveValidator->validate() (Line: 132)
Drupal\Core\TypedData\TypedData->validate() (Line: 518)
Drupal\Core\Entity\ContentEntityBase->validate() (Line: 188)
Drupal\Core\Entity\ContentEntityForm->validateForm()
call_user_func_array() (Line: 82)
Drupal\Core\Form\FormValidator->executeValidateHandlers() (Line: 274)
Drupal\Core\Form\FormValidator->doValidateForm() (Line: 118)
Drupal\Core\Form\FormValidator->validateForm() (Line: 593)
Drupal\Core\Form\FormBuilder->processForm() (Line: 326)
Drupal\Core\Form\FormBuilder->buildForm() (Line: 73)
Drupal\Core\Controller\FormController->getContentResult()
call_user_func_array() (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 638)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 121)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 181)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 53)
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle() (Line: 32)
Drupal\big_pipe\StackMiddleware\ContentLength->handle() (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 57)
Drupal\advban\AdvbanMiddleware->handle() (Line: 50)
Drupal\ban\BanMiddleware->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 36)
Drupal\Core\StackMiddleware\AjaxPageState->handle() (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 741)
Drupal\Core\DrupalKernel->handle() (Line: 19) - 🇧🇪Belgium gillesbailleux La Roche-en-Ardenne
Hi,
Because all my nodes use the schema_metatag module, I have the same problem sitewide. On this D10.3.1 website, the PHP version is 8.3.9.
TypeError: Cannot access offset of type string on string in Drupal\Core\Render\Renderer->doRender() (line 318 of /home/gilloteaux/public_html/web/core/lib/Drupal/Core/Render/Renderer.php).
#0 /home/gilloteaux/public_html/web/core/lib/Drupal/Core/Render/Renderer.php(248): Drupal\Core\Render\Renderer->doRender()
#1 /home/gilloteaux/public_html/web/core/lib/Drupal/Core/Render/Renderer.php(165): Drupal\Core\Render\Renderer->render()
#2 /home/gilloteaux/public_html/web/core/lib/Drupal/Core/Render/Renderer.php(638): Drupal\Core\Render\Renderer->Drupal\Core\Render\{closure}()
#3 /home/gilloteaux/public_html/web/core/lib/Drupal/Core/Render/Renderer.php(164): Drupal\Core\Render\Renderer->executeInRenderContext()
#4 /home/gilloteaux/public_html/web/core/lib/Drupal/Core/Render/Renderer.php(174): Drupal\Core\Render\Renderer->renderInIsolation()
#5 /home/gilloteaux/public_html/web/modules/contrib/schema_metatag/src/Plugin/schema_metatag/PropertyType/BreadcrumbList.php(125): Drupal\Core\Render\Renderer->renderPlain()
#6 /home/gilloteaux/public_html/web/modules/contrib/schema_metatag/src/Plugin/schema_metatag/PropertyType/ItemListElement.php(48): Drupal\schema_metatag\Plugin\schema_metatag\PropertyType\BreadcrumbList->getItems()
#7 /home/gilloteaux/public_html/web/modules/contrib/schema_metatag/src/Plugin/schema_metatag/PropertyType/BreadcrumbList.php(94): Drupal\schema_metatag\Plugin\schema_metatag\PropertyType\ItemListElement->outputValue()
#8 /home/gilloteaux/public_html/web/modules/contrib/schema_metatag/src/Plugin/metatag/Tag/SchemaNameBase.php(206): Drupal\schema_metatag\Plugin\schema_metatag\PropertyType\BreadcrumbList->outputValue()
#9 /home/gilloteaux/public_html/web/modules/contrib/schema_metatag/src/Plugin/metatag/Tag/SchemaNameBase.php(179): Drupal\schema_metatag\Plugin\metatag\Tag\SchemaNameBase->outputValue()
#10 /home/gilloteaux/public_html/web/modules/contrib/metatag/src/MetatagManager.php(634): Drupal\schema_metatag\Plugin\metatag\Tag\SchemaNameBase->output()
#11 /home/gilloteaux/public_html/web/modules/contrib/metatag/src/MetatagManager.php(564): Drupal\metatag\MetatagManager->generateRawElements()
#12 /home/gilloteaux/public_html/web/modules/contrib/metatag/metatag.module(504): Drupal\metatag\MetatagManager->generateElements()
#13 /home/gilloteaux/public_html/web/modules/contrib/metatag/metatag.module(131): metatag_get_tags_from_route()
#14 /home/gilloteaux/public_html/web/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(311): metatag_page_attachments()
#15 /home/gilloteaux/public_html/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(395): Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}()
#16 /home/gilloteaux/public_html/web/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(308): Drupal\Core\Extension\ModuleHandler->invokeAllWith()
#17 /home/gilloteaux/public_html/web/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(285): Drupal\Core\Render\MainContent\HtmlRenderer->invokePageAttachmentHooks()
#18 /home/gilloteaux/public_html/web/core/lib/Drupal/Core/Render/Renderer.php(638): Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}()
#19 /home/gilloteaux/public_html/web/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(284): Drupal\Core\Render\Renderer->executeInRenderContext()
#20 /home/gilloteaux/public_html/web/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(128): Drupal\Core\Render\MainContent\HtmlRenderer->prepare()
#21 /home/gilloteaux/public_html/web/core/lib/Drupal/Core/EventSubscriber/MainContentViewSubscriber.php(90): Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse()
#22 [internal function]: Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray()
#23 /home/gilloteaux/public_html/web/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(111): call_user_func()
#24 /home/gilloteaux/public_html/vendor/symfony/http-kernel/HttpKernel.php(186): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch()
#25 /home/gilloteaux/public_html/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
#26 /home/gilloteaux/public_html/web/core/lib/Drupal/Core/StackMiddleware/Session.php(53): Symfony\Component\HttpKernel\HttpKernel->handle()
#27 /home/gilloteaux/public_html/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle()
#28 /home/gilloteaux/public_html/web/core/lib/Drupal/Core/StackMiddleware/ContentLength.php(28): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
#29 /home/gilloteaux/public_html/web/core/modules/big_pipe/src/StackMiddleware/ContentLength.php(32): Drupal\Core\StackMiddleware\ContentLength->handle()
#30 /home/gilloteaux/public_html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(191): Drupal\big_pipe\StackMiddleware\ContentLength->handle()
#31 /home/gilloteaux/public_html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(128): Drupal\page_cache\StackMiddleware\PageCache->fetch()
#32 /home/gilloteaux/public_html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(82): Drupal\page_cache\StackMiddleware\PageCache->lookup()
#33 /home/gilloteaux/public_html/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle()
#34 /home/gilloteaux/public_html/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
#35 /home/gilloteaux/public_html/web/core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php(36): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
#36 /home/gilloteaux/public_html/web/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\AjaxPageState->handle()
#37 /home/gilloteaux/public_html/web/core/lib/Drupal/Core/DrupalKernel.php(741): Drupal\Core\StackMiddleware\StackedHttpKernel->handle()
#38 /home/gilloteaux/public_html/web/index.php(19): Drupal\Core\DrupalKernel->handle()
#39 {main} - 🇺🇸United States DamienMcKenna NH, USA
Bumping this to a critical issue as it's breaking sites.
- Status changed to Needs review
4 months ago 10:22am 16 July 2024 - 🇧🇪Belgium gillesbailleux La Roche-en-Ardenne
Working on a live site, which patch do I have to apply?
- 🇧🇪Belgium gillesbailleux La Roche-en-Ardenne
Patch #8 does not fix the problem
gilloteaux@ct822-drupal:~/public_html/web/modules/contrib/schema_metatag$ wget https://www.drupal.org/files/issues/2024-07-16/schema_metatag-n3461565-8... →
--2024-07-16 16:29:17-- https://www.drupal.org/files/issues/2024-07-16/schema_metatag-n3461565-8... →
Resolving www.drupal.org (www.drupal.org)... 151.101.38.217
Connecting to www.drupal.org (www.drupal.org)|151.101.38.217|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1445 (1.4K) [text/plain]
Saving to: ‘schema_metatag-n3461565-8.patch’schema_metatag-n3461565-8.patch 100%[================================================================================================================>] 1.41K --.-KB/s in 0s
2024-07-16 16:29:17 (34.5 MB/s) - ‘schema_metatag-n3461565-8.patch’ saved [1445/1445]
gilloteaux@ct822-drupal:~/public_html/web/modules/contrib/schema_metatag$
- 🇺🇸United States DamienMcKenna NH, USA
The output shows the patch downloading but did you apply it?
patch -p1 < schema_metatag-n3461565-8.patch
-
DamienMcKenna →
committed 80a4383b on 3.0.x
Issue #3461565 by DamienMcKenna, luigisa, Maeglin, gillesbailleux,...
-
DamienMcKenna →
committed 80a4383b on 3.0.x
- Status changed to Fixed
4 months ago 2:54pm 16 July 2024 - 🇺🇸United States DamienMcKenna NH, USA
Per a conversation on Slack, #8 fixes the problem for gillesbailleux too, so let's go with that.
- Merge request !65BreadrumbList::getItems() used text before it was defined. → (Closed) created by DamienMcKenna
- 🇺🇸United States DamienMcKenna NH, USA
I've tagged a new release with this fix: https://www.drupal.org/project/schema_metatag/releases/3.0.3 →
Automatically closed - issue fixed for 2 weeks with no activity.