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

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

TrailWiki created an issue. See original summary.

TR’s picture

Title: "Route "entity.uc_country.collection" does not exist." » Route "entity.uc_country.collection" does not exist.
Issue summary: View changes
Issue tags: -uninstall
Related issues: -#2814139: Uninstall Order Module
apsylone’s picture

It's the "Country" module which cause this bug.

TR’s picture

Priority: Normal » Minor

No, it's the local task definition in the uc_store module. I just haven't had a chance to test the fix yet.

peterhollo’s picture

Is there any workaround? This has currently broken my (dev) site.

peterhollo’s picture

FWIW I fixed it with this MySQL query:
delete from menu_tree where route_name = 'entity.uc_country.collection';

Znak’s picture

Assigned: Unassigned » Znak
Znak’s picture

Status: Active » Postponed (maintainer needs more info)

So, I doesn't have a problems. Maybe you can write more info.

TR’s picture

Assigned: Znak » Unassigned
Status: Postponed (maintainer needs more info) » Active
mukila’s picture

Faced the same issue. comment #6 helped for me. Thanks Peter. Also need to empty cache table.

swatiphp’s picture

I had same issue resolved by comment #6 and also need to clear cache - drupal cr. Thanks @peterhollo and @mulika

TR’s picture

Status: Active » Needs review
FileSize
451 bytes
chrisck’s picture

#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:

The website encountered an unexpected error. Please try again later.

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.

joshuautley’s picture

I too am using PHP 7.2 and #12 has not solved this issue.

Cayenne’s picture

I am stuck here as well. Drupal 8, PHP 7.4
Loaded latest dev, and we seem to be able to make progress..

drupalfan79’s picture

The 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:

dependencies:
  - ubercart:uc_country

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

parent: uc_store.admin.store.config

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

drupalfan79’s picture

updated the patch with full changes, and fixed the test issues.

drupalbug’s picture

Status: Needs review » Reviewed & tested by the community
bablukmt’s picture

Thanks swatiphp

Issue resolved by comment #11

Thanks

AbhijeetKalsi’s picture

#6 Works with charm. Caching clear is important. Drush CR does not work for me. Directly truncate all Cache table.

Alex Oliver Perez’s picture

#6 solve the issue. Clear the cache tables afterwards. Thanks