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

Created on 4 June 2024, 20 days ago
Updated 13 June 2024, 11 days 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.

I can view the paragraph type with the extra field, but when I click the extra field tab, I get the same error. I can only look at the "manage fields" tab.

I tried the two patches listed here (one at a time): https://www.drupal.org/project/entity_extra_field/issues/3440363 πŸ› Unable to add an extra field on a content type/bundle that has no extra fields already Active
- #6 didn't resolve my issue.
- #2 got hung on `composer install` for a long time and then gave me this error: "Cannot apply patch 3440363: Unable to add an extra field on a content type/bundle that has no extra fields already"

I tried the patch listed here in comment #8: https://www.drupal.org/project/entity_extra_field/issues/3440365 πŸ› Unable to edit existing extra field or render any public site pages RTBC
- #8 didn't resolve my issue.

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)?

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)
πŸ’¬ 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.69.0 2024