After upgrading from core 8.3.x, I can no longer get the Drupal-icon shortcut links in the admin_toolbar to work (includes clear-cache and run cron), uninstalling the tools module results in an error:
$ drush pm-uninstall admin_toolbar_tools
The following extensions will be uninstalled: admin_toolbar_tools
Do you really want to continue? (y/n): y
admin_toolbar_tools was successfully uninstalled. [ok]
Symfony\Component\Routing\Exception\ResourceNotFoundException: No routes found for "/". in Drupal\Core\Routing\Router->matchRequest() (line 159 of [error]
.../docroot/core/lib/Drupal/Core/Routing/Router.php).
Symfony\Component\Routing\Exception\ResourceNotFoundException: No routes found for "/". in Drupal\Core\Routing\Router->matchRequest() (line 159 of [error]
.../docroot/core/lib/Drupal/Core/Routing/Router.php).
re-installing the admin_toolbar_tools does nothing, and uninstalling seems to always throw the above error.
Before upgrading to 8.4.x, I had to uninstall all of admin_toolbar for a similar reason, because without doing so and upgrading resulted in similar errors, however, these errors would kill the site with a WSOD, these are the errors if I tried to upgrade Drupal core without first uninstalling the module:
Uncaught PHP Exception Symfony\Component\Routing\Exception\RouteNotFoundException: "Route "admin_toolbar_tools.drupalorg" does not exist." at .../docroot/core/lib/Drupal/Core/Routing/RouteProvider.php line 190
Uncaught PHP Exception Symfony\Component\Routing\Exception\RouteNotFoundException: "Route "admin_toolbar_tools.flush" does not exist." at .../docroot/core/lib/Drupal/Core/Routing/RouteProvider.php line 190
Comment | File | Size | Author |
---|---|---|---|
#9 | 8.3-8.4_upgrade_fix_2938884_9.patch | 392 bytes | Spurlos |
Issue fork admin_toolbar-2938884
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 #2
romainj CreditAttribution: romainj as a volunteer commented@bdanin What version of PHP do you use?
Comment #3
bdanin CreditAttribution: bdanin commentedThis started with PHP 5.6, and there was no change when we upgraded to PHP 7.1
also, keep getting this error on config import:
Symfony\Component\Routing\Exception\ResourceNotFoundException: No routes found for "/". in Drupal\Core\Routing\Router->matchRequest() (line 159 of /app/docroot/core/lib/Drupal/Core/Routing/Router.php). [error]
Comment #4
jason_purdy CreditAttribution: jason_purdy commentedI ran into this problem, but when I did a pm-uninstall, cr, en, and cr, I was able to get the admin_toolbar back up & running.
Comment #5
bdanin CreditAttribution: bdanin commented@purdy_nc, yes that's what I had to run in order to get the site back up and running
The admin toolbar itself is mostly working, but some of the links are no longer showing up
The main issue is that the admin_toolbar_extras (includes links to clear cache, run cron, the drupalicon links) is no longer functional (even though it's marked as turned on and active)
I also keep getting the `No routes found for "/". in Drupal\Core\Routing\Router->matchRequest()` error whenever running drush pm commands
Comment #6
bisonbleu CreditAttribution: bisonbleu commentedI have a similar issue when running Drupal 8.5.3 under MAMP 4.x and php 7.1.8. The only option appears to be uninstalling admin_toolbar_tools.
Comment #7
Spurlos CreditAttribution: Spurlos at FFW commentedI think I have found the issue that caused this behavior. Route 'admin_toolbar_tools.drupalorg' is being loaded from route cache after core update, and cache has the record with that cid, but there is no data, thus its breaks the code down the road. A simple route rebuild helps to populate the caches with needed data about this route. I have attached a patch.
Comment #8
Spurlos CreditAttribution: Spurlos at FFW commentedForgot to name the hook correctly
Comment #9
Spurlos CreditAttribution: Spurlos at FFW commentedAnd another function name fix. Looks like 8000 hook update number cannot be used.
Comment #10
adriancidComment #12
adriancidThanks for the patch :-)
Comment #13
bdanin CreditAttribution: bdanin commentedthis doens't seem to work for me, I still have the same issues, and uninstalling and re-installing admin_toolbar produces the same error I used to have before:
Comment #14
bdanin CreditAttribution: bdanin commentedComment #15
webcultist CreditAttribution: webcultist commentedHave the same problem with the latest dev @drupal 8.5.4 @php7.1
Comment #16
adriancidHave you tried to do
drush updb
?Comment #17
bennybobw CreditAttribution: bennybobw commentedYep, same problem here. Installing the dev and running the update script doesn't fix the issue. I tried to uninstall the chosen module and I get this error from the admin toolbar:
PHP message: Uncaught PHP Exception Symfony\\Component\\Routing\\Exception\\RouteNotFoundException: "Route "chosen.admin" does not exist.
I tried uninstalling and reinstalling admin_toolbar and admin_toolbar_tools, but then the drupal drop menu with clear cache, etc. went away.
Drupal 8.5.3
PHP 5.6
Comment #18
adriancid@bennybobw we don't have a route named "chosen.admin", so your problem doesn't comes from this module.
Comment #19
bennybobw CreditAttribution: bennybobw commentedMy bad. I thought the error was coming from admin_toolbar because it's trying rendering a link that should no longer be in the menu after uninstalling the chosen module. I turned off the admin_toolbar module and it started working, so I assumed the problem was in admin toolbar. I will open an issue in the chosen module queue.
Comment #20
adriancidComment #21
bdanin CreditAttribution: bdanin commentedwith the latest 8.5 upgrades, this was actually fixed; not sure exactly what did it, but glad everything's back to normal
Comment #23
fdefeyter@gmail.com CreditAttribution: fdefeyter@gmail.com commentedstill the same problem...
Comment #24
adriancidfdefeyter@gmail.com can you describe your problem and how to reproduce it?
Comment #25
nareshbw CreditAttribution: nareshbw as a volunteer and commentedI am also getting the same issue. But when I am trying same code base and DB on other environment I am not able to see this error. In short I want to say it is very hard to replicate the issue on other instances with same code base.
Comment #26
g089h515r806 CreditAttribution: g089h515r806 commentedthe same issue still exist:
After uninstall feeds tamper module, I got :
rename admin_toolbar to admin_toolbar2, I could access the website, clear the cache. fixed it.
I think this is a bug of admin_toolbar.
Comment #27
BeauTownsend CreditAttribution: BeauTownsend commentedI think that the issue is not with admin_toolbar, but rather with broken config.
In my case, I had an orphaned Feeds Type configuration, and since there was no actual Feeds Type associated with it, a valid path in the form of
/admin/structure/feeds/manage/{feeds_feed_type}/display
could not be generated.Deleting the orphaned config solved all associated issues for me.
To g089h515r806's comment, I think that your fix worked, not because of a bug in admin_toolbar, but because it temporarily prevented admin_toolbar from attempting to build broken paths, and thus not interfering with cache clear.
If you have Drupal Console installed, you can view the route information associated with your broken route with:
drupal debug:router <route name>
Admin toolbar simply expands your menu tree, so it's going to uncover broken links if they are in your menu.
Comment #28
berliner CreditAttribution: berliner commentedThat explanation makes sense. What's the options of finding broken config?
No routes found for "/" doesn't give a log of hints.
Comment #29
Nick Hope CreditAttribution: Nick Hope commentedI have been fighting this issue for a very long time. Earlier today I was still having to run Admin Toolbar 2.4 and Devel 1.2 with Drupal 8.9.13 because if I uninstalled Admin Toolbar Tools or changed versions of Admin Toolbar I would get this error:
Symfony\Component\Routing\Exception\RouteNotFoundException: Route "admin_toolbar_tools.flush" does not exist. in Drupal\Core\Routing\RouteProvider->getRouteByName() (line 208 of core\lib\Drupal\Core\Routing\RouteProvider.php).
If I updated both Admin Toolbar to 3.0.0 and Devel to 4.1.1 then the error changed to this (same as the message described in this issue):
Symfony\Component\Routing\Exception\RouteNotFoundException: Route "devel.execute_php" does not exist. in Drupal\Core\Routing\RouteProvider->getRouteByName() (line 208 of core\lib\Drupal\Core\Routing\RouteProvider.php).
I've tried many things to resolve this, using Drush and Drupal Console to uninstall, reinstall, rebuild caches, debug routes, configs etc. etc. and nothing worked. However I have finally managed to solve the problem by manually removing entries from the database. These were the steps:
1. Uninstalled all Admin Tools and Devel modules, updated database and cleared cache, using drush because site had a WSOD when logged in as admin:
2. Opened PHPMyAdmin. In my case I am using Acquia Dev Desktop so I did this by selecting the site in Dev Desktop > "More" > "Open database manager..."
3. Clicked on the database name in the left column corresponding with the site name then click on "Search" tab.
4. Entered %admin_toolbar_tools% in the search field > "Inside Tables" > "Select All" > "Go" (bottom right).
5. Deleted the following matches (after clicking "Browse" to see what I was deleting):
- 1 match in cachetags
- 1 match in cache_config
- 1 match in cache_menu
- 1 match in config_snapshot
- 1 match in cache_menu
- 362 matches in menu_tree (when I clicked "browse" it showed all had been added by admin_toolbar_tools)
I left 51 matches in the watchdog table, which I guess are just logs of error messages.
Then when I refreshed the site I got this message:
Symfony\Component\Routing\Exception\RouteNotFoundException: Route "devel.admin_settings" does not exist. in Drupal\Core\Routing\RouteProvider->getRouteByName() (line 208 of core\lib\Drupal\Core\Routing\RouteProvider.php)
6. Repeated #4 but search for %devel.admin_settings% then deleted the following matches:
- 1 match in cache_menu
- 1 match in config_snapshot
- 2 matches in menu_tree
7. That brought my site back to life without a WSOD, but I still noticed some matches for %admin_toolbar% and I deleted these:
- 1 match in cache_dynamic_page_cache
- 1 match in cache_render
- 1 match in cachetags
- 1 match in config_snapshot
- 17 matches in menu_tree
Again I left the 20 matches in the watchdog table.
8. Finally I deleted these matches for a search for %devel%, being careful that they were matches for "devel" and not "development".
- 1 match in cachetags
- 1 match in config_snapshot
9. Then with Admin Toolbar and Devel and their traces properly nuked, I was able to install Devel 3.0.0 and Admin Toolbar 4.1.1 via Composer, and they even appeared in my /admin/reports/updates list, which they haven't in years. Then enabled the 3 extra Admin Toolbar modules too.
Hopefully this might help someone. A bit daunting deleting stuff manually in a Drupal database and I'm quite surprised it worked. Be very careful and take a good backup first!