Problem/Motivation
The module admin toolbar tools provides a link to the media library page and expects the view media_library with display page to be enabled.
When the page is not enabled, you will get the error: Route "view.media_library.page" does not exist.
Steps to reproduce
Disable the page display from the media_library view.
Proposed resolution
I suggest we first check if the route exists before adding the link.
Remaining tasks
Create patch- Review path
User interface changes
None
API changes
None
Data model changes
None
| Comment | File | Size | Author |
|---|---|---|---|
| 3218206-admin_toolbar-route_view_media_library_page-2.patch | 839 bytes | tim-diels |
Comments
Comment #2
tim-dielsPatch provided
Comment #3
natedouglas commentedWorked for me and did not cause other issues. Setting to RTBC.
Comment #4
jmester13 commentedWorked for me as well on 8.9.16.
Thanks for the work here!
Comment #6
adriancidThanks
Comment #9
adriancidThis bug is present in branch 2.x too
Comment #10
cwyattjibc commentedIm getting that error after the security upgrade of that module version
composer require drupal/admin_toolbar:3.0.2
core version 8.9.18
Symfony\Component\Routing\Exception\RouteNotFoundException: Route "view.media_library.page" does not exist. in Drupal\Core\Routing\RouteProvider->getRouteByName() (line 208 of core/lib/Drupal/Core/Routing/RouteProvider.php).
Comment #11
dallen33 commentedHaving the same issue as well.
Comment #12
alisonPatch works for me on 3.0.2, unsurprisingly - thank you for the fix!
I imagine it wasn't included in the latest release because the latest release was a security update, right? -- so, it'll just be in the next non-security release (though maybe just 3.x, not 2.x).
Comment #13
adriancidThis fix is in the dev branch, will be included in the next release.
Comment #14
kartagisI came across this issue because it just happened to me. It also seems the fix has been applied. I got the error when I attempted to use one time login link.