User error: "1" after migrate Drupal 9 > 10

Created on 15 November 2023, about 1 year ago
Updated 28 July 2024, 5 months ago

Problem/Motivation

Following the migration of my Drupal 9 website to Drupal 10, it became impossible to load images in the field_image of the nodes.

Do you have any idea where this error could come from?
User error: "1" is an invalid render array key in
Drupal\Core\Render\Element::children()
(/var/www/clients/..../core/lib/Drupal/Core/Render/Element. php line 98)

sorry for my English
Thank you very much if you take the time to tell me an idea

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

💬 Support request
Status

Closed: outdated

Version

11.0 🔥

Component
Field 

Last updated 2 days ago

Created by

🇫🇷France chsdaiguil Coteaux-du-lyonnais

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • Issue created by @chsdaiguil
  • There is likely a module or a theme that is not compatible with Drupal 10. Configure logging at /admin/config/development/logging to "All messages, with backtrace information" and provide the backtrace here.

  • 🇫🇷France chsdaiguil Coteaux-du-lyonnais

    Thank you @cilefen

    User error: "1" is an invalid render array key in Drupal\Core\Render\Element::children() (line 98 of core/lib/Drupal/Core/Render/Element.php).
    Drupal\Core\Render\Element::children(Array, 1) (Line: 416)
    Drupal\Core\Render\Renderer->doRender(Array) (Line: 458)
    Drupal\Core\Render\Renderer->doRender(Array) (Line: 458)
    Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 204)
    Drupal\Core\Render\Renderer->render(Array) (Line: 474)
    Drupal\Core\Template\TwigExtension->escapeFilter(Object, Array, 'html', NULL, 1) (Line: 90)
    __TwigTemplate_42bdefe175c3c1544177838175fb81e0->doDisplay(Array, Array) (Line: 394)
    Twig\Template->displayWithErrorHandling(Array, Array) (Line: 367)
    Twig\Template->display(Array) (Line: 379)
    Twig\Template->render(Array, Array) (Line: 40)
    Twig\TemplateWrapper->render(Array) (Line: 53)
    twig_render_template('core/themes/claro/templates/classy/layout/html.html.twig', Array) (Line: 372)
    Drupal\Core\Theme\ThemeManager->render('html', Array) (Line: 445)
    Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 204)
    Drupal\Core\Render\Renderer->render(Array) (Line: 158)
    Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 592)
    Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 159)
    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: 111)
    Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object, 'kernel.view') (Line: 186)
    Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 76)
    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: 51)
    Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 704)
    Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

  • Debug Drupal\Core\Render\Renderer->render to see what is passed to it.

  • 🇫🇷France chsdaiguil Coteaux-du-lyonnais

    @cilefen I don't know how to do that. Is there a tutorial page to help me do this debugging, please ?

  • Status changed to Fixed about 1 year ago
  • 🇫🇷France chsdaiguil Coteaux-du-lyonnais
  • Status changed to Active about 1 year ago
  • 🇫🇷France chsdaiguil Coteaux-du-lyonnais
  • 🇫🇷France chsdaiguil Coteaux-du-lyonnais

    @cilefen The php error is still present. Can you explain how to debug Drupal\Core\Render\Renderer ?

  • Status changed to Postponed: needs info about 1 year ago
  • Debugging Drupal is very well documented online.

  • 🇫🇷France chsdaiguil Coteaux-du-lyonnais

    @cilefen
    There are, you are right, quantities of tutorials on the web, I have seen it. But can you give me the right path to solve this php problem, and Debug Drupal\Core\Render\Renderer

    Thanks

  • Status changed to Closed: outdated 5 months ago
  • There have been no updates in eight months.

Production build 0.71.5 2024