Updating to 2.1.0-rc1 throws an "undefined array key" error

Created on 4 June 2024, 7 months ago

Problem/Motivation

I have a Drupal 10 site (10.2.6). I updated Entity Extra Field from 2.0.0-alpha5 to 2.1.0-rc1.

After updating, the paragraph type that uses an extra field is throwing an error:
Warning: Undefined array key "entity_extra_field.catalog_topic_grid.catalog_topic_grid" in Drupal\Core\Config\Entity\ConfigEntityStorage->doLoadMultiple() (line 206 of core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php).

When I try to load the site, I see this error:
Error: Call to a member function getName() on null in Drupal\Core\Config\Entity\ConfigEntityStorage->doLoadMultiple() (line 206 of core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php).

Question

I've looked for patches and for other people with my issue. The only thread I found suggested disabling the module, updating, and then re-enabling it. That worked on local, but not when it was pushed to a test site on our web host.

Full error message is here:

The website encountered an unexpected error. Try again later.

Error: Call to a member function getName() on null in Drupal\Core\Config\Entity\ConfigEntityStorage->doLoadMultiple() (line 206 of core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php).
Drupal\Core\Entity\EntityStorageBase->loadMultiple() (Line: 26)
entity_extra_field_entity_extra_field_info()
call_user_func_array(Object, Array) (Line: 409)
Drupal\Core\Extension\ModuleHandler->Drupal\Core\Extension\{closure}(Object, 'entity_extra_field') (Line: 388)
Drupal\Core\Extension\ModuleHandler->invokeAllWith('entity_extra_field_info', Object) (Line: 416)
Drupal\Core\Extension\ModuleHandler->invokeAll('entity_extra_field_info') (Line: 676)
Drupal\Core\Entity\EntityFieldManager->loadExtraFields() (Line: 649)
Drupal\Core\Entity\EntityFieldManager->getExtraFields('node', 'page') (Line: 171)
Drupal\Core\Entity\EntityDisplayBase->init() (Line: 153)
Drupal\Core\Entity\EntityDisplayBase->__construct(Array, 'entity_view_display') (Line: 181)
Drupal\Core\Entity\Entity\EntityViewDisplay->__construct(Array, 'entity_view_display') (Line: 418)
Drupal\Core\Entity\EntityStorageBase->mapFromStorageRecords(Array) (Line: 186)
Drupal\Core\Config\Entity\ConfigEntityStorage->doLoadMultiple(Array) (Line: 312)
Drupal\Core\Entity\EntityStorageBase->loadMultiple(Array) (Line: 121)
Drupal\Core\Entity\Entity\EntityViewDisplay::collectRenderDisplays(Array, 'full') (Line: 280)
Drupal\Core\Entity\EntityViewBuilder->buildMultiple(Array) (Line: 238)
Drupal\Core\Entity\EntityViewBuilder->build(Array)
call_user_func_array(Array, Array) (Line: 111)
Drupal\Core\Render\Renderer->doTrustedCallback(Array, Array, 'Render #pre_render callbacks must be methods of a class that implements \Drupal\Core\Security\TrustedCallbackInterface or be an anonymous function. The callback was %s. See https://www.drupal.org/node/2966725', 'exception', 'Drupal\Core\Render\Element\RenderCallbackInterface') (Line: 859)
Drupal\Core\Render\Renderer->doCallback('#pre_render', Array, Array) (Line: 421)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 240)
Drupal\Core\Render\Renderer->render(Array, ) (Line: 238)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 627)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 239)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 128)
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: 28)
Drupal\Core\StackMiddleware\ContentLength->handle(Object, 1, 1) (Line: 32)
Drupal\big_pipe\StackMiddleware\ContentLength->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: 36)
Drupal\Core\StackMiddleware\AjaxPageState->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 704)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

Are there additional update steps besides updating the module and doing a database update (I didn't actually have any database updates when I tried that)?

πŸ’¬ Support request
Status

Active

Version

2.1

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States fozzieblue

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

Comments & Activities

Production build 0.71.5 2024