Error in BreadcrumbList render handling

Created on 16 July 2024, 3 months ago
Updated 1 August 2024, 3 months ago

Problem/Motivation

After updating the module from version 3.0.1 to 3.0.2, it is no longer possible to edit and save the nodes. The problem also occurs in 3.0.3, with 3.0.1 everything is fine again.

Tested under Drupal 10.3.1, PHP 8.3.x, 10.5.x MariaDB, Chrome Browser. The node was not translated, there is no other language in the instance except English as default.

Steps to reproduce

  • Install module version 3.0.1
  • call up a content type, e.g. Page
  • Insert title
  • Insert paragraph image as media element
  • Insert paragraph text
  • Publish and save node
  • Update module to 3.0.2/3.0.3
  • Call up the node in edit mode and click on the โ€˜Editโ€™ button next to the paragraph text
  • The following note appears at the top of the node: Oops, something went wrong. Check your browser's developer console for more details.

In Chrome's dev console, an Ajax error is displayed in detailed form for the process. Here in abbreviated form:

js_OBX1kK58Kkh3hjZqI...ipSxHI5_AdsAuQ-:262 Uncaught 
Drupal.AjaxError {message: โ€˜\nAn AJAX HTTP error occurred.\nHTTP Result Code: 50...encountered an unexpected error. Try again later.', name: โ€œAjaxErrorโ€, stack: โ€œError\n at https://domainname.com/sites/default/fi...lfaZFoLHc0RgPrgRPw1OZuauipSxHI5_AdsAuQ-:262:19740โ€}
message
: 
โ€˜\nAn AJAX HTTP error occurred.\nHTTP Result Code: 500\nDebugging information follows.\nPath: /node/2/edit?destination=/admin/content/node&ajax_form=1\nStatusText: error\nResponseText: The website encountered an unexpected error. Try again later.โ€™
name
: 
โ€˜AjaxErrorโ€™
stack
: 
โ€˜Error\n at https://domainname.com/sites/default/files/js/js_OBX1kK58Kkh3hjZqIirnnD9QjBDkVWXTlWCgsb8Sraw.js?scope=footer&delta=0&language=en&theme=adminimal_theme&include=eJyNVEtypDAMvZADqxxgZirZ5giUMAI0bVuObJjk9iPoBopPdWUDlvT0e5JtOWT8ygO4spEhgivsqnlxFG7JWBZcjGAzjTgbjIKm_2J6iIbrdkgWMlbogTQstjC4bAI3a5jpvItr2TmICU2E3C_K6TwrYMhc_qOmw7zzSlnT7AvMUDsUTJFD0kqN7TlhWNPMksl8U938vTuTtixBAX8_B5TvomXxmlmgE4h92gpaNMWjmk1TtQh50MzasEPtXnlsSTxk4nCJS1a06ypzpQ4ewy4aYrmTionRjoWu-m0U-LzcaW7KiPHYEFSOagH5XihtyWn7i9dduiexN8VnllcdUIO_HdubWXUbawu7Kxp97CFR-hG4z969hY4C_ghOHjo8lgeOujBzeDTo6kzThJOlnrr5HDifglFoLiLNy33SpRMuQsr4Luw_2pbsKbig5xHfL0tKPIjFN5UodCdjREvg_vQ6VavkpCNgXgUzlUl5UxsPXw5Dp9dqPZmE43YpAowv6pv0WrCrQcrH32AYSXimtVJOSFeQ1zW5NBr77DlZ4kLjKVSHbEUWxCemolfaZFoLHc0RgPrgRPw1OZuauipSxHI5_AdsAuQ-:262:2411\n at https://domainname.com/sites/default/files/js/js_OBX1kK58Kkh3hjZqIirnnD9QjBDkVWXTlWCgsb8Sraw.js?scope=footer&delta=0&language=en&theme=adminimal_theme&include=eJyNVEtypDAMvZADqxxgZirZ5giUMAI0bVuObJjk9iPoBopPdWUDlvT0e5JtOWT8y
[Prototype]]
: 
Error at https://domainname.com/sites/default/files/js/js_OBX1kK58Kkh3hjZqIirnnD9QjBDkVWXTlWCgsb8Sraw.js?scope=footer&delta=0&language=en&theme=adminimal_theme&include=eJyNVEtypDAMvZADqxxgZirZ5giUMAI0bVuObJjk9iPoBopPdWUDlvT0e5JtOWT8ygO4spEhgivsqnlxFG7JWBZcjGAzjTgbjIKm_2J6iIbrdkgWMlbogTQstjC4bAI3a5jpvItr2TmICU2E3C_K6TwrYMhc_qOmw7zzSlnT7AvMUDsUTJFD0kqN7TlhWNPMksl8U938vTuTtixBAX8_B5TvomXxmlmgE4h92gpaNMWjmk1TtQh50MzasEPtXnlsSTxk4nCJS1a06ypzpQ4ewy4aYrmTionRjoWu-m0U-LzcaW7KiPHYEFSOagH5XihtyWn7i9dduiexN8VnllcdUIO_HdubWXUbawu7Kxp97CFR-hG4z969hY4C_ghOHjo8lgeOujBzeDTo6kzThJOlnrr5HDifglFoLiLNy33SpRMuQsr4Luw_2pbsKbig5xHfL0tKPIjFN5UodCdjREvg_vQ6VavkpCNgXgUzlUl5UxsPXw5Dp9dqPZmE43YpAowv6pv0WrCrQcrH32AYSXimtVJOSFeQ1zW5NBr77DlZ4kLjKVSHbEUWxCemolfaZFoLHc0RgPrgRPw1OZuauipSxHI5_AdsAuQ-:262:2411 at https://domainname.com/sites/default/files/js/js_OBX1kK58Kkh3hjZqIirnnD9QjBDkVWXTlWCgsb8Sraw.js?scope=footer&delta=0&language=en&theme=adminimal_theme&include=eJyNVEtypDAMvZADqxxgZirZ5giUMAI0bVuObJjk9iPoBopPdWUDlvT0e5JtOWT8ygO4spEhgivs
๏ปฟ

The following is displayed in the backtrace log:

Message: Error: Cannot use object of type Drupal\Core\StringTranslation\TranslatableMarkup as array in Drupal\Core\Render\Renderer->doRender() (line 269 of /var/www/vhosts/domianname.com/environment/production/docroot/core/lib/Drupal/Core/Render/Renderer.php).

#0 /var/www/vhosts/domainname.dld/environment/production/docroot/core/lib/Drupal/Core/Render/Renderer.php(248): Drupal\Core\Render\Renderer->doRender()
#1 /var/www/vhosts/domainname.dld/environment/production/docroot/core/lib/Drupal/Core/Render/Renderer.php(165): Drupal\Core\Render\Renderer->render()
#2 /var/www/vhosts/domainname.dld/environment/production/docroot/core/lib/Drupal/Core/Render/Renderer.php(638): Drupal\Core\Render\Renderer->Drupal\Core\Render\{closure}()
#3 /var/www/vhosts/domainname.dld/environment/production/docroot/core/lib/Drupal/Core/Render/Renderer.php(164): Drupal\Core\Render\Renderer->executeInRenderContext()
#4 /var/www/vhosts/domainname.dld/environment/production/docroot/core/lib/Drupal/Core/Render/Renderer.php(174): Drupal\Core\Render\Renderer->renderInIsolation()
#5 /var/www/vhosts/domainname.dld/environment/production/docroot/modules/contrib/schema_metatag/src/Plugin/schema_metatag/PropertyType/BreadcrumbList.php(125): Drupal\Core\Render\Renderer->renderPlain()
#6 /var/www/vhosts/domainname.dld/environment/production/docroot/modules/contrib/schema_metatag/src/Plugin/schema_metatag/PropertyType/ItemListElement.php(48): Drupal\schema_metatag\Plugin\schema_metatag\PropertyType\BreadcrumbList->getItems()
#7 /var/www/vhosts/domainname.dld/environment/production/docroot/modules/contrib/schema_metatag/src/Plugin/schema_metatag/PropertyType/BreadcrumbList.php(94): Drupal\schema_metatag\Plugin\schema_metatag\PropertyType\ItemListElement->outputValue()
#8 /var/www/vhosts/domainname.dld/environment/production/docroot/modules/contrib/schema_metatag/src/Plugin/metatag/Tag/SchemaNameBase.php(206): Drupal\schema_metatag\Plugin\schema_metatag\PropertyType\BreadcrumbList->outputValue()
#9 /var/www/vhosts/domainname.dld/environment/production/docroot/modules/contrib/schema_metatag/src/Plugin/metatag/Tag/SchemaNameBase.php(179): Drupal\schema_metatag\Plugin\metatag\Tag\SchemaNameBase->outputValue()
#10 /var/www/vhosts/domainname.dld/environment/production/docroot/modules/contrib/metatag/src/MetatagManager.php(634): Drupal\schema_metatag\Plugin\metatag\Tag\SchemaNameBase->output()
#11 /var/www/vhosts/domainname.dld/environment/production/docroot/modules/contrib/metatag/src/Plugin/Field/MetatagEntityFieldItemList.php(61): Drupal\metatag\MetatagManager->generateRawElements()
#12 /var/www/vhosts/domainname.dld/environment/production/docroot/core/lib/Drupal/Core/Render/Renderer.php(638): Drupal\metatag\Plugin\Field\MetatagEntityFieldItemList::Drupal\metatag\Plugin\Field\{closure}()
#13 /var/www/vhosts/domainname.dld/environment/production/docroot/modules/contrib/metatag/src/Plugin/Field/MetatagEntityFieldItemList.php(48): Drupal\Core\Render\Renderer->executeInRenderContext()
#14 /var/www/vhosts/domainname.dld/environment/production/docroot/modules/contrib/metatag/src/TypedData/ComputedItemListTrait.php(32): Drupal\metatag\Plugin\Field\MetatagEntityFieldItemList->computeValue()
#15 /var/www/vhosts/domainname.dld/environment/production/docroot/core/lib/Drupal/Core/TypedData/ComputedItemListTrait.php(114): Drupal\metatag\Plugin\Field\MetatagEntityFieldItemList->ensureComputedValue()
#16 /var/www/vhosts/domainname.dld/environment/production/docroot/core/lib/Drupal/Core/TypedData/Validation/RecursiveContextualValidator.php(162): Drupal\metatag\Plugin\Field\MetatagEntityFieldItemList->isEmpty()
#17 /var/www/vhosts/domainname.dld/environment/production/docroot/core/lib/Drupal/Core/TypedData/Validation/RecursiveContextualValidator.php(164): Drupal\Core\TypedData\Validation\RecursiveContextualValidator->validateNode()
#18 /var/www/vhosts/domainname.dld/environment/production/docroot/core/lib/Drupal/Core/TypedData/Validation/RecursiveContextualValidator.php(106): Drupal\Core\TypedData\Validation\RecursiveContextualValidator->validateNode()
#19 /var/www/vhosts/domainname.dld/environment/production/docroot/core/lib/Drupal/Core/TypedData/Validation/RecursiveValidator.php(93): Drupal\Core\TypedData\Validation\RecursiveContextualValidator->validate()
#20 /var/www/vhosts/domainname.dld/environment/production/docroot/core/lib/Drupal/Core/TypedData/TypedData.php(132): Drupal\Core\TypedData\Validation\RecursiveValidator->validate()
#21 /var/www/vhosts/domainname.dld/environment/production/docroot/core/lib/Drupal/Core/Entity/ContentEntityBase.php(518): Drupal\Core\TypedData\TypedData->validate()
#22 /var/www/vhosts/domainname.dld/environment/production/docroot/core/lib/Drupal/Core/Entity/ContentEntityForm.php(188): Drupal\Core\Entity\ContentEntityBase->validate()
#23 [internal function]: Drupal\Core\Entity\ContentEntityForm->validateForm()
#24 /var/www/vhosts/domainname.dld/environment/production/docroot/core/lib/Drupal/Core/Form/FormValidator.php(82): call_user_func_array()
#25 /var/www/vhosts/domainname.dld/environment/production/docroot/core/lib/Drupal/Core/Form/FormValidator.php(274): Drupal\Core\Form\FormValidator->executeValidateHandlers()
#26 /var/www/vhosts/domainname.dld/environment/production/docroot/core/lib/Drupal/Core/Form/FormValidator.php(118): Drupal\Core\Form\FormValidator->doValidateForm()
#27 /var/www/vhosts/domainname.dld/environment/production/docroot/core/lib/Drupal/Core/Form/FormBuilder.php(593): Drupal\Core\Form\FormValidator->validateForm()
#28 /var/www/vhosts/domainname.dld/environment/production/docroot/core/lib/Drupal/Core/Form/FormBuilder.php(326): Drupal\Core\Form\FormBuilder->processForm()
#29 /var/www/vhosts/domainname.dld/environment/production/docroot/core/lib/Drupal/Core/Controller/FormController.php(73): Drupal\Core\Form\FormBuilder->buildForm()
#30 [internal function]: Drupal\Core\Controller\FormController->getContentResult()
#31 /var/www/vhosts/domainname.dld/environment/production/docroot/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array()
#32 /var/www/vhosts/domainname.dld/environment/production/docroot/core/lib/Drupal/Core/Render/Renderer.php(638): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#33 /var/www/vhosts/domainname.dld/environment/production/docroot/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(121): Drupal\Core\Render\Renderer->executeInRenderContext()
#34 /var/www/vhosts/domainname.dld/environment/production/docroot/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext()
#35 /var/www/vhosts/domainname.dld/environment/production/vendor/symfony/http-kernel/HttpKernel.php(181): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#36 /var/www/vhosts/domainname.dld/environment/production/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
#37 /var/www/vhosts/domainname.dld/environment/production/docroot/core/lib/Drupal/Core/StackMiddleware/Session.php(53): Symfony\Component\HttpKernel\HttpKernel->handle()
#38 /var/www/vhosts/domainname.dld/environment/production/docroot/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle()
#39 /var/www/vhosts/domainname.dld/environment/production/docroot/core/lib/Drupal/Core/StackMiddleware/ContentLength.php(28): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
#40 /var/www/vhosts/domainname.dld/environment/production/docroot/core/modules/big_pipe/src/StackMiddleware/ContentLength.php(32): Drupal\Core\StackMiddleware\ContentLength->handle()
#41 /var/www/vhosts/domainname.dld/environment/production/docroot/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\big_pipe\StackMiddleware\ContentLength->handle()
#42 /var/www/vhosts/domainname.dld/environment/production/docroot/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass()
#43 /var/www/vhosts/domainname.dld/environment/production/docroot/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle()
#44 /var/www/vhosts/domainname.dld/environment/production/docroot/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
#45 /var/www/vhosts/domainname.dld/environment/production/docroot/core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php(36): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
#46 /var/www/vhosts/domainname.dld/environment/production/docroot/modules/contrib/remove_http_headers/src/StackMiddleware/RemoveHttpHeadersMiddleware.php(49): Drupal\Core\StackMiddleware\AjaxPageState->handle()
#47 /var/www/vhosts/domainname.dld/environment/production/docroot/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\remove_http_headers\StackMiddleware\RemoveHttpHeadersMiddleware->handle()
#48 /var/www/vhosts/domainname.dld/environment/production/docroot/core/lib/Drupal/Core/DrupalKernel.php(741): Drupal\Core\StackMiddleware\StackedHttpKernel->handle()
#49 /var/www/vhosts/domainname.dld/environment/production/docroot/index.php(19): Drupal\Core\DrupalKernel->handle()
#50 {main}

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

๐Ÿ› Bug report
Status

Fixed

Version

3.0

Component

Code

Created by

๐Ÿ‡ฉ๐Ÿ‡ชGermany zcht

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