UNEXPECTED ERROR in all Views

Created on 15 December 2024, 11 days ago

Problem/Motivation

When using with webprofiler 10.1.10, an UNEXPECTED ERROR occurred in all Views.
The message is below.

The website encountered an unexpected error. Try again later.

Drupal\Component\Plugin\Exception\PluginNotFoundException: The "perm" plugin does not exist. Valid plugin IDs for Drupal\views\Plugin\ViewsPluginManager are: in Drupal\Core\Plugin\DefaultPluginManager->doGetDefinition() (line 53 of core/lib/Drupal/Component/Plugin/Discovery/DiscoveryTrait.php).

For example, the backtrace of an arbitrary view /admin/people looks like this

Drupal\Core\Plugin\DefaultPluginManager->getDefinition('perm') (Line: 16)
Drupal\Core\Plugin\Factory\ContainerFactory->createInstance('perm', Array) (Line: 83)
Drupal\Component\Plugin\PluginManagerBase->createInstance('perm') (Line: 824)
Drupal\views\Plugin\views\display\DisplayPluginBase->getPlugin('access') (Line: 2308)
Drupal\views\Plugin\views\display\DisplayPluginBase->access(Object) (Line: 1826)
Drupal\views\ViewExecutable->access(Array) (Line: 64)
Drupal\views\Element\View::preRenderViewElement(Array)
call_user_func_array(Array, Array) (Line: 113)
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: 870)
Drupal\Core\Render\Renderer->doCallback('#pre_render', Array, Array) (Line: 432)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 248)
Drupal\Core\Render\Renderer->render(Array, ) (Line: 238)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 638)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 231)
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) (Line: 97)
Drupal\tracer\EventDispatcher\TraceableEventDispatcher->dispatch(Object, 'kernel.view') (Line: 186)
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: 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: 38)
Drupal\tracer\StackMiddleware\TracesMiddleware->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)

The error was resolved by uninstalling the Tracer module.

Env: Drupal 10.3.10

Thank you.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇯🇵Japan s-jack Tokyo

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @s-jack
  • @s-jack. I am unable to replicate the issue on Drupal 10.3.10 site. And, how are you able to use webprofiler without Tracer API, since Tracer API is a required module for WebProfiler. Can you give some more details?

  • 🇯🇵Japan s-jack Tokyo

    Hi, @nidhish.
    I kinda don't remember the details, but in order to update to Drupal 11, I need to update from webprofiler 10.1.10 to 11.0.0.

    So I tried to uninstall the webprofiler module from the admin UI, but only webprofiler was uninstalled, not tracer which has the necessary dependencies.
    I do not recall receiving a message telling me to uninstall Tracer first.

    In the unlikely event that only Tracer remains, does it contain code that would cause problems?

  • 🇯🇵Japan s-jack Tokyo

    I am submitting the issue because I encountered an error during the uninstallation process of the webprofiler module.

    https://gitlab.com/drupalspoons/webprofiler/-/issues/103

Production build 0.71.5 2024