Closed (fixed)
Project:
Gin Toolbar
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
19 Apr 2021 at 07:09 UTC
Updated:
8 Jun 2021 at 17:59 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #3
chr.fritschFix pushed to branch
Comment #4
volkerk commentedThe mr fixes the exception.
Using the gin toolbar without admin_toolbar is not very satisfactionable, markup looks rather broken without icon classes, maybe add a dependency (could be a follow-up)?
Comment #6
saschaeggiCan you review this again with latest devs of Gin & Gin Toolbar?

Even without this change and without admin_toolbar it looks good to me.
See
Comment #7
ambient.impactHi there. I'm getting the exact same error when upgrading from 1.0.0-beta14 to 1.0.0-beta15, but on a project that I've never installed contrib Admin Toolbar module (just the core Toolbar module).
Full error:
The website encountered an unexpected error. Please try again later. InvalidArgumentException: Class "toolbar_tools_menu_navigation_links" does not exist. in Drupal\Core\DependencyInjection\ClassResolver->getInstanceFromDefinition() (line 24 of core\lib\Drupal\Core\DependencyInjection\ClassResolver.php). Drupal\Core\Controller\ControllerResolver->getControllerFromDefinition('toolbar_tools_menu_navigation_links') (Line: 140) Drupal\Core\Menu\MenuLinkTree->transform(Array, Array) (Line: 58) Drupal\gin_toolbar\Render\Element\GinToolbar::preRenderTray(Array) call_user_func_array(Array, Array) (Line: 100) 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. Support for this callback implementation is deprecated in 8.8.0 and will be removed in Drupal 9.0.0. See https://www.drupal.org/node/2966725', 'silenced_deprecation', 'Drupal\Core\Render\Element\RenderCallbackInterface') (Line: 781) Drupal\Core\Render\Renderer->doCallback('#pre_render', Array, Array) (Line: 372) Drupal\Core\Render\Renderer->doRender(Array) (Line: 444) Drupal\Core\Render\Renderer->doRender(Array) (Line: 444) Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 200) Drupal\Core\Render\Renderer->render(Array) (Line: 93) template_preprocess_toolbar(Array, 'toolbar', Array) (Line: 287) Drupal\Core\Theme\ThemeManager->render('toolbar', Array) (Line: 431) Drupal\Core\Render\Renderer->doRender(Array) (Line: 444) Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 200) Drupal\Core\Render\Renderer->render(Array) (Line: 501) Drupal\Core\Template\TwigExtension->escapeFilter(Object, Array, 'html', NULL, 1) (Line: 98) __TwigTemplate_b577d186f6fd849d55a8ef0538fc7c076ba1143ff41ed668d3385f1e5fa09d9d->doDisplay(Array, Array) (Line: 455) Twig\Template->displayWithErrorHandling(Array, Array) (Line: 422) Twig\Template->display(Array) (Line: 434) Twig\Template->render(Array) (Line: 64) twig_render_template('themes/contrib/gin/templates/html.html.twig', Array) (Line: 384) Drupal\Core\Theme\ThemeManager->render('html', Array) (Line: 431) Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 200) Drupal\Core\Render\Renderer->render(Array) (Line: 147) Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 573) Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 148) Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90) Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object) call_user_func(Array, Object, 'kernel.view', Object) (Line: 111) Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object) (Line: 156) Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68) Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57) Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47) Drupal\Core\StackMiddleware\KernelPreHandle->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: 47) Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52) Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 49) Drupal\remove_http_headers\StackMiddleware\RemoveHttpHeadersMiddleware->handle(Object, 1, 1) (Line: 23) Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 708) Drupal\Core\DrupalKernel->handle(Object) (Line: 19)Comment #8
saschaeggi@Ambient.Impact can you confirm that the provided patch will solve this for you?
=> https://git.drupalcode.org/project/gin_toolbar/-/merge_requests/7.patch
Comment #9
ambient.impactThe patch does indeed fix the WSOD, but applying to both the stable release and the latest dev results in the same missing icons as in #4.
Comment #10
saschaeggi@Ambient.Impact => latest patch from MR (https://git.drupalcode.org/project/gin_toolbar/-/merge_requests/7.patch) should fix the issue now.
Comment #11
ambient.impact@saschaeggi That does appear to fix it, thanks!
Comment #12
saschaeggiThanks y'all!
Comment #13
ambient.impactGIF link because I can't embed it here
Comment #14
ambient.impactWhoops. My bad. 😅
Comment #16
ambient.impactI noticed that this item wasn't included in the change log for the latest version, but the patch was failing to apply, so I assume the fix is in the released version hence the failing patch. If anyone else runs into this - just remove the patch as it's no longer needed.