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
Comment #2
mitrax commentedI can confirm the issue. It happens occasionally without any particular reason.
Comment #3
imclean commentedIt 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.
Comment #4
imclean commentedClearing the cache after uninstalling the search does fix the issue for now.
Comment #5
imclean commentedI 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?
Comment #6
vood002 commentedFor 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.
Comment #11
danielvezaThis 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!
Comment #12
danielvezaNo 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!
Comment #13
nigelcunningham commentedI'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:
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.