Fatal error on /admin/config/development/configuration

Created on 22 October 2024, about 1 month ago

Problem/Motivation

The website encountered an unexpected error. Try again later.

TypeError: Drupal\rabbit_hole\BehaviorInvoker::getBehaviorPlugin(): Argument #1 ($entity) must be of type Drupal\Core\Entity\ContentEntityInterface, Drupal\config_split\Entity\ConfigSplitEntity given, called in /var/www/html/web/modules/contrib/rabbit_hole_links/src/RabbitHoleLinksLinkGenerator.php on line 57 in Drupal\rabbit_hole\BehaviorInvoker->getBehaviorPlugin() (line 146 of modules/contrib/rabbit_hole/src/BehaviorInvoker.php).
Drupal\rabbit_hole_links\RabbitHoleLinksLinkGenerator->alterUrl(Object) (Line: 39)
Drupal\rabbit_hole_links\RabbitHoleLinksLinkGenerator->generate('DEV-02', Object) (Line: 164)
Drupal\Core\Link->toString() (Line: 28)
config_split_form_config_admin_import_form_alter(Array, Object, 'config_admin_import_form') (Line: 552)
Drupal\Core\Extension\ModuleHandler->alter('form', Array, Object, 'config_admin_import_form') (Line: 834)
Drupal\Core\Form\FormBuilder->prepareForm('config_admin_import_form', Array, Object) (Line: 285)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 73)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 638)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 121)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 181)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 53)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 77)
Drupal\lnx_base\HeadersMiddleware->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: 741)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

Proposed resolution

Check entity instance before using $entity in RabbitHoleLinksLinkGenerator.php

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇩🇪Germany drupatz

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