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.

Comments

mxmilkiib created an issue. See original summary.

mitrax’s picture

I can confirm the issue. It happens occasionally without any particular reason.

imclean’s picture

It happened to me when I uninstalled core's Search module. It messes up the book page layout and I can't access the "Manage Display" page. Enabling the Search module again fixed the issue, but it isn't ideal.

This is using Field Layout rather than Layout Builder.

imclean’s picture

Clearing the cache after uninstalling the search does fix the issue for now.

imclean’s picture

I installed Content Access and rebuilt permissions. After that, a custom content type "manage display" screen caused the error to be logged. Clearing cache fixed it. I guess the cache should always be cleared when installing, uninstalling and updating modules but is there a more graceful way this could be handled?

vood002’s picture

For anyone else who finds this. I believe the patch only affects future clones, it wont "clean up" old clones.

There is a property in the yaml configuration file for your cloned menus that looks like "locked: true". You just need to change that to false, import config, then you can delete the menu.

Version: 9.1.x-dev » 9.3.x-dev

Drupal 9.1.10 (June 4, 2021) and Drupal 9.2.10 (November 24, 2021) were the last bugfix releases of those minor version series. Drupal 9 bug reports should be targeted for the 9.3.x-dev branch from now on, and new development or disruptive changes should be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.15 was released on June 1st, 2022 and is the final full bugfix release for the Drupal 9.3.x series. Drupal 9.3.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.4.x-dev branch from now on, and new development or disruptive changes should be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.9 was released on December 7, 2022 and is the final full bugfix release for the Drupal 9.4.x series. Drupal 9.4.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.5.x-dev branch from now on, and new development or disruptive changes should be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

danielveza’s picture

Status: Active » Postponed (maintainer needs more info)

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!

danielveza’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

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!

nigelcunningham’s picture

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.