Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I cannot uninstall Ubercart. I have installed a fresh blank copy of Drupal and Ubercart 8.x-4.x-dev and I can reproduce the issue.
Installed
Drupal 8.2.5
Ubercart 8.x-4.0-dev
Installed Cart, Country, Order, Product, and Store.
Uninstall Cart
Uninstall Order
Uninstall Product
Uninstall Store
When Uninstalling Country I get
RouteNotFoundException: "Route "entity.uc_country.collection" does not exist." at /[DrupalPath]/core/lib/Drupal/Core/Routing/RouteProvider.php line 187
Comment | File | Size | Author |
---|---|---|---|
#17 | 2841196-17.patch | 1.36 KB | drupalfan79 |
| |||
#16 | 2841196-16.patch | 975 bytes | drupalfan79 |
| |||
#12 | collection.patch | 451 bytes | TR |
|
Comments
Comment #2
TR CreditAttribution: TR commentedComment #3
apsylone CreditAttribution: apsylone at The Gobeliners commentedIt's the "Country" module which cause this bug.
Comment #4
TR CreditAttribution: TR commentedNo, it's the local task definition in the uc_store module. I just haven't had a chance to test the fix yet.
Comment #5
peterhollo CreditAttribution: peterhollo commentedIs there any workaround? This has currently broken my (dev) site.
Comment #6
peterhollo CreditAttribution: peterhollo commentedFWIW I fixed it with this MySQL query:
delete from menu_tree where route_name = 'entity.uc_country.collection';
Comment #7
Znak CreditAttribution: Znak commentedComment #8
Znak CreditAttribution: Znak commentedSo, I doesn't have a problems. Maybe you can write more info.
Comment #9
TR CreditAttribution: TR commentedComment #10
mukila CreditAttribution: mukila commentedFaced the same issue. comment #6 helped for me. Thanks Peter. Also need to empty cache table.
Comment #11
swatiphp CreditAttribution: swatiphp as a volunteer commentedI had same issue resolved by comment #6 and also need to clear cache - drupal cr. Thanks @peterhollo and @mulika
Comment #12
TR CreditAttribution: TR commentedComment #13
chrisck CreditAttribution: chrisck commented#12 Tried patching this to 8.x-4.0-alpha5 and it's not working. After trying to uninstall Ubercart, the site is broken, showing the following message:
PHP Error logs showing this:
Uncaught PHP Exception Symfony\Component\Routing\Exception\RouteNotFoundException: "Route "entity.uc_country.collection" does not exist." at XXXXXXX/core/lib/Drupal/Core/Routing/RouteProvider.php line 201
I'm using PHP 7.2.8.
Comment #14
joshuautley CreditAttribution: joshuautley commentedI too am using PHP 7.2 and #12 has not solved this issue.
Comment #15
Cayenne CreditAttribution: Cayenne commentedI am stuck here as well. Drupal 8, PHP 7.4
Loaded latest dev, and we seem to be able to make progress..
Comment #16
drupalfan79 CreditAttribution: drupalfan79 commentedThe cause
The cause of the failure to uninstall country is uc_country and uc_store modules depend on each other.
uc_store depends on uc_country, because in ubercart/uc_store/uc_store.links.task.yml, there is base route defined in uc_country
base_route: entity.uc_country.collection
and in ubercart/uc_store/uc_store.info.yml, defines the dependency:
But uc_country also depends on uc_store, because in ubercart/uc_country/uc_country.links.menu.yml, there is parent route defined in uc_store
Proposed Solution
in uc_country, remove the dependency on uc_store, and move the related the menu link definition from uc_country/uc_country.links.menu.yml to
uc_store/uc_store.links.menu.yml
Comment #17
drupalfan79 CreditAttribution: drupalfan79 commentedupdated the patch with full changes, and fixed the test issues.
Comment #18
drupalbug CreditAttribution: drupalbug commentedComment #19
bablukmt CreditAttribution: bablukmt commentedThanks swatiphp
Issue resolved by comment #11
Thanks
Comment #20
AbhijeetKalsi CreditAttribution: AbhijeetKalsi commented#6 Works with charm. Caching clear is important. Drush CR does not work for me. Directly truncate all Cache table.
Comment #21
Alex Oliver Perez CreditAttribution: Alex Oliver Perez commented#6 solve the issue. Clear the cache tables afterwards. Thanks