- Issue created by @neograph734
- 🇸🇬Singapore huijing
I have a similar error but not the same use-case. I have this problem with my custom theme when the user is logged in (and can thus view the admin toolbar), but not on an /admin path and thus not using the admin theme.
Failed to load resource: the server responded with a status of 403 (Forbidden) /toolbar/subtrees/tIVl5ln58vFEmCyPTSLbaD9Di9ea7IePkVcscAbCu20?_wrapper_format=drupal_ajax
The error log looks like this:
Type access denied Date Tuesday, November 28, 2023 - 11:32 User superadmin Location http://localhost/toolbar/subtrees/tIVl5ln58vFEmCyPTSLbaD9Di9ea7IePkVcscAbCu20?_wrapper_format=drupal_ajax Referrer http://localhost/ Message Path: /toolbar/subtrees/tIVl5ln58vFEmCyPTSLbaD9Di9ea7IePkVcscAbCu20?_wrapper_format=drupal_ajax. Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException: in Drupal\Core\Routing\AccessAwareRouter->checkAccess() (line 118 of /web/core/lib/Drupal/Core/Routing/AccessAwareRouter.php). Severity Warning Hostname 127.0.0.1
- 🇩🇰Denmark kasperg
I am experiencing the same issue as originally reported.
The consequences of this situation are now hitting administrative users due to a change in Drupal 10.1 where JavaScript errors are now shown in the UI → .
- 🇩🇰Denmark kasperg
I have created an issue fork which provides a temporary workaround for avoiding the visible UI error.
Instead of checking for hash equality in the access check it is moved to the controller.
Since this is a workaround instead of a fix I have not created a merge request.
- Status changed to Needs review
9 months ago 5:46pm 20 March 2024 - Status changed to Postponed: needs info
9 months ago 6:01pm 20 March 2024 - 🇺🇸United States smustgrave
Appears same patch was uploaded on 🐛 Faulty Toolbar Subtree Hash Needs work
This should be closed as a duplicate if it's fixed in another.
- Status changed to Closed: duplicate
9 months ago 6:19pm 20 March 2024 - 🇳🇱Netherlands neograph734 Netherlands
Thanks @smustgrave, that does indeed look like a duplicate. And I suppose the root cause analyses there also makes more sense.
The recent patch looks like the hotfix from #6, but I am not convinced of that. I think the initial solution direction of 🐛 Faulty Toolbar Subtree Hash Needs work is a lot better.