Problem/Motivation
When downgrading a user from Administrator to a lower role, he gets a WSOD and can't use the project anymore. Clearing caches and rebuilding access permissions doesn't help.
Backtrace:
UnexpectedValueException: base:block has no corresponding route. in Drupal\Core\Url->getRouteName() (line 567 of core/lib/Drupal/Core/Url.php).
admin_toolbar_links_access_filter_filter_non_accessible_links() (Line: 52)
admin_toolbar_links_access_filter_preprocess_menu()
call_user_func_array() (Line: 287)
Drupal\Core\Theme\ThemeManager->render() (Line: 433)
Drupal\Core\Render\Renderer->doRender() (Line: 204)
Drupal\Core\Render\Renderer->render() (Line: 118)
Drupal\toolbar\Controller\ToolbarController::Drupal\toolbar\Controller\{closure}() (Line: 580)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 119)
Drupal\toolbar\Controller\ToolbarController::preRenderGetRenderedSubtrees()
call_user_func_array() (Line: 101)
Drupal\Core\Render\Renderer->doTrustedCallback() (Line: 788)
Drupal\Core\Render\Renderer->doCallback() (Line: 374)
Drupal\Core\Render\Renderer->doRender() (Line: 204)
Drupal\Core\Render\Renderer->render() (Line: 285)
{closure}() (Line: 580)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 286)
toolbar_get_rendered_subtrees() (Line: 297)
_toolbar_get_subtrees_hash() (Line: 168)
toolbar_toolbar()
call_user_func_array() (Line: 426)
Drupal\Core\Extension\ModuleHandler->Drupal\Core\Extension\{closure}() (Line: 405)
Drupal\Core\Extension\ModuleHandler->invokeAllWith() (Line: 433)
Drupal\Core\Extension\ModuleHandler->invokeAll() (Line: 81)
Drupal\toolbar\Element\Toolbar::preRenderToolbar()
call_user_func_array() (Line: 101)
Drupal\Core\Render\Renderer->doTrustedCallback() (Line: 788)
Drupal\Core\Render\Renderer->doCallback() (Line: 374)
Drupal\Core\Render\Renderer->doRender() (Line: 446)
Drupal\Core\Render\Renderer->doRender() (Line: 204)
Drupal\Core\Render\Renderer->render() (Line: 479)
Drupal\Core\Template\TwigExtension->escapeFilter() (Line: 83)
__TwigTemplate_7a8aff35746c404ed4bab73dd72bd985->doDisplay() (Line: 405)
Twig\Template->displayWithErrorHandling() (Line: 378)
Twig\Template->display() (Line: 390)
Twig\Template->render() (Line: 55)
twig_render_template() (Line: 384)
Drupal\Core\Theme\ThemeManager->render() (Line: 433)
Drupal\Core\Render\Renderer->doRender() (Line: 204)
Drupal\Core\Render\Renderer->render() (Line: 162)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 580)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 163)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse() (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray()
call_user_func() (Line: 142)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch() (Line: 174)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 81)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 58)
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 50)
Drupal\ban\BanMiddleware->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 23)
Stack\StackedHttpKernel->handle() (Line: 718)
Drupal\Core\DrupalKernel->handle() (Line: 19)
Any ideas?
Switching the user back to Administrator makes the error go away.
Steps to reproduce
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | 3380953-original-link.patch | 787 bytes | almunnings |
| #3 | admin_toolbar-3380953_3.patch | 5.4 KB | anybody |
Issue fork admin_toolbar-3380953
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
anybodyMR as static patch attached!
Comment #4
anybodySeems like this was fixed in latest 3.x-dev! Happens only in 3.4.1 for me. So maybe a new tagged release would be nice?
Leaving this open for review, but might be closed then.
Comment #5
anybodyJust ran into this in another installation, this time with the error:
So raising the priority for a new tagged release!
Comment #6
michaelschutz commentedJust confirming that this issue exists for me in one of my sites as well, using the OpenSocial profile (v11.10.1) which requires Admin Toolbar 3.4.1. Got a WSOD after updating, and the error message was that from #5. Applying the patch in #3 fixed it.
Comment #8
adriancidThanks
Comment #10
almunningsThis patch has introduced a new issue.
$original_link is null.
Comment #11
almunningsComment #12
xmacinfo@almunnings Please open a new issue and put your patch there.
Comment #13
rteijeiro commentedI created a new issue as suggested in #12 for the issue reported in #10 and re-rolled the patch: https://www.drupal.org/project/admin_toolbar/issues/3528054