EntityTypeManager.php:223; entity_view_display" entity type did not specify a "edit" form class

Created on 27 January 2021, about 4 years ago
Updated 18 July 2024, 9 months ago

My sites Software content type pages sometimes come up blank, and when I try to go to 'config/structure/types/manage/software/display' I get an error;

The website encountered an unexpected error. Please try again later.

Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException: The "entity_view_display" entity type did not specify a "edit" form class. in Drupal\Core\Entity\EntityTypeManager->getFormObject() (line 223 of core/lib/Drupal/Core/Entity/EntityTypeManager.php).

Drupal\Core\Entity\HtmlEntityFormController->getFormObject() (Line: 58)
Drupal\Core\Controller\FormController->getContentResult() (Line: 39)
Drupal\layout_builder\Controller\LayoutBuilderHtmlEntityFormController->getContentResult()
call_user_func_array() (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 573)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 158)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 80)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 57)
Drupal\Core\StackMiddleware\Session->handle() (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 57)
Drupal\advban\AdvbanMiddleware->handle() (Line: 50)
Drupal\ban\BanMiddleware->handle() (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 49)
Drupal\remove_http_headers\StackMiddleware\RemoveHttpHeadersMiddleware->handle() (Line: 23)
Stack\StackedHttpKernel->handle() (Line: 706)
Drupal\Core\DrupalKernel->handle() (Line: 19)

Clearing caches temporarily resolves the issue, but it keeps happening every day or two. I'm not sure what is triggering it. One user has said though that it happened directly after they had anon submitted a new software item, not sure how actually related that was.

πŸ› Bug report
Status

Closed: cannot reproduce

Version

11.0 πŸ”₯

Component
Layout builderΒ  β†’

Last updated 2 days ago

Created by

πŸ‡¬πŸ‡§United Kingdom mxmilkiib

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.

  • πŸ‡³πŸ‡ΏNew Zealand danielveza Brisbane, AU

    This issue is now over 3 years old with no updates.

    Can we please get some steps to replicate this starting with a fresh install of Drupal 11. If no further updates are made to this ticket in 3 months this will be a candidate to be closed.

    Thanks for raising an issue!

  • Status changed to Closed: cannot reproduce 9 months ago
  • πŸ‡³πŸ‡ΏNew Zealand danielveza Brisbane, AU

    No further updates have been made on this issue and it was unable to replicated in the last comment over 3 months ago, so I'm now marking this one as closed.

    Thanks!

  • πŸ‡¦πŸ‡ΊAustralia nigelcunningham Geelong

    I've reproduced the issue today, finding a problem in the verifyImplementations function in ModuleHandler.php.
    The code there invokes function_exists to check that an implementation exists without having first ensured that the file that might contain the function definition has been loaded.
    Adding "$this->loadInclude($module, 'module');" at line 700 of ModuleHandler.php (Drupal 10.3.2) makes the problem go away for me.
    To reproduce the issue, I'm doing a cache clear, followed by a page load at admin/structure/display-modes/view. The page loads fine the first time but on the second load, I'm getting:

    The website encountered an unexpected error. Try again later.
    
    Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException: The "entity_view_mode" entity type did not specify a list_builder handler. in Drupal\Core\Entity\EntityTypeManager->getHandler() (line 265 of core/lib/Drupal/Core/Entity/EntityTypeManager.php).
    Drupal\Core\Entity\EntityTypeManager->getListBuilder('entity_view_mode') (Line: 23)
    Drupal\Core\Entity\Controller\EntityListController->listing('entity_view_mode')
    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: 68)
    Drupal\simple_oauth\HttpMiddleware\BasicAuthSwap->handle(Object, 1, 1) (Line: 53)
    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: 263)
    Drupal\shield\ShieldMiddleware->bypass(Object, 1, 1) (Line: 130)
    Drupal\shield\ShieldMiddleware->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)
    

    With the change mentioned above in place, I can reload the page without issue.
    I assume there's a contrib module or custom code that's the root cause of this, but haven't yet located it. Hopefully the above will at least prove helpful in some way.

Production build 0.71.5 2024