I have developed a drupal 8 commerce website for a customer.
I have installed commerce reports alpha version.
And it was working well until certain situation where the module couldn't execute its batch progressing.
I though. "It's ok. I'll uninstall the module. Reinstall it. Maybe that will restore it to its defaults and fixes the problem."
Head to extend section and uninstalled the module. And here was the shock. The entire website stopped working providing me with the only famous message.

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

Only the admin area stopped working, the front end was wroking well!

I headed to the log file to see this error record:

[22-Jul-2018 22:25:19 UTC] Uncaught PHP Exception Symfony\Component\Routing\Exception\RouteNotFoundException: "Route "commerce_reports.configuration" does not exist." at /home/kats/public_html/core/lib/Drupal/Core/Routing/RouteProvider.php line 202

Seems like Drupal broke in the middle of the uninstallation process.
and The only thing I could do is to restore a db backup (working in production environment).

Comments

Wisamx created an issue. See original summary.

maboresev’s picture

Hello Wisamx,

I have thought about your problem and I think that it's not a Drupal Core bug. You use a contrib module (Commerce Reporting) which makes by default at least a content type. I don't know why, but module configuration could not be deleted completely when you uninstall this module (I checked that it has an schema's configuration file, but it could be not well defined). This is the reason why you have problems reinstalling the module.

Please, check it.

Wisamx’s picture

Thanks @maboresev for your response.

What fears me is that me also don't know why module configuration could not be deleted completely, and Drupal couldn't handle the error by it self.

What I think is that Drupal (in such situation "Route "commerce_reports.configuration" does not exist.") should have its own way of ignoring such minor error. instead of broking the whole website.

as a Wordpress developer I love its way of preventing the site from being broken when a plugin make a fatal error or its directory removed.
Wordpress automatically disables (not uninstalls) the plugins in such cases.

Drupal 8 misses the Module Disabling feature.

Version: 8.5.4 » 8.5.x-dev

Core issues are now filed against the dev versions where changes will be made. Document the specific release you are using in your issue comment. More information about choosing a version.

Version: 8.5.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Branches prior to 8.8.x are not supported, and Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.2.x-dev

Drupal 8 is end-of-life as of November 17, 2021. There will not be further changes made to Drupal 8. Bugfixes are now made to the 9.3.x and higher branches only. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.2.x-dev » 9.3.x-dev
catch’s picture

Project: Drupal core » Commerce Reports (Google Charts)
Version: 9.3.x-dev »
Component: extension system » Code

Moving to commerce reports module.

avpaderno’s picture

Project: Commerce Reports (Google Charts) » Commerce Reporting
Version: » 8.x-1.x-dev

Basing on the link given in the issue summary, this report was supposed to be posted for the Commerce Reports project, now renamed Commerce Reporting.