When uninstalling in both Drush and UI i'm getting the following error:

Symfony\Component\Routing\Exception\RouteNotFoundException: Route "entity.backup_migrate_source.canonical" does not exist. in /web/core/lib/Drupal/Core/Routing/RouteProvider.php:190                                                                                                  

Comments

roborew created an issue. See original summary.

ioana apetri’s picture

I've tested on Drupal 8.5 and it works perfectly for me.

damienmckenna’s picture

I'm sorry you've ran into this bug. Had you created any custom configurations (extra destinations, sources, schedule)?

roborew’s picture

Actually likely I have, ill try clearing all configuration and attempt uninstalling again. Will report back.

ikit-claw’s picture

Did you install with Composer and then try to uninstall with Drush?

roborew’s picture

I installed the package with composer. Enabled with Drush and committed the config.

Just removed all configuration through the UI and tried uninstalling again using both Drush and through UI and still receiving the error unfortunately.

I might try a ditch attempt and see what happens if I edit the config directly and import to see if this uninstalls the module.

roborew’s picture

Removed backup_migrate from core.extension and removed all config files.

Drush cim still results in the same error.

Not critical for now as we are not using the module but has no impact on production, but not got any time yet to debug. If anyone else has run into this and has a solution it would be appreciated.

yazzbe’s picture

My error log complained about a private files folder that could not be found by the module.

Warning: opendir(): Unable to find the wrapper "private" - did you forget to enable it when you configured PHP? in BackupMigrate\Core\Destination\DirectoryDestination->_getAllFileNames() (line 245 of /sites/web/mydrupal/www/modules/backup_migrate/lib/backup_migrate_core/src/Destination/DirectoryDestination.php)

Created a private files folder (files/private).
hit save on the configuration > media > file system to set the .htaccess
run update.php, run cron, cleared cache & checked status report for errors.

After that. I was able to uninstalled the module (with drush).

tandroid’s picture

I wasn't able to track down the real issue, but if anyone is looking for a quick and dirty solution to getting this uninstalled, you can add the route to the backup_migrate.routing.yml file so it won't throw an error. This is what I added:

entity.backup_migrate_source.canonical:
  path: '/admin/config/development/backup_migrate/remove'
damienmckenna’s picture

Version: 8.x-4.0-beta3 » 8.x-4.x-dev
bradjones1’s picture

I ran into this ticket while debugging the failed uninstall of one of my custom modules; the issue here is that the Source entity type specifies a canonical link template, however there is no corresponding route. So a quick patch to remove that link template should fix this.

purencool’s picture

@tandroid #9 worked fine for me thanks

damienmckenna’s picture

Status: Active » Needs review
StatusFileSize
new3.6 KB

Out of interest, does this fix the problem? I noticed there was a difference between the routes the entity defined vs what the routing file had.

This patch tries to match them all up as they currently are.

While reviewing them I noticed that some of them were structured differently. Most of them are in the format /admin/config/development/backup_migrate/[entity]/[action]/[entity_id] though some are /admin/config/development/backup_migrate/[entity]/[entity_id]/[action]. I think we could do a follow-on issue to resolve these inconsistencies, but for now hopefully this will help.

Status: Needs review » Needs work

The last submitted patch, 13: backup_migrate-n2939095-13.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

s_leu’s picture

The patch in the last post didn't fix the problem for me. Also it introduces more problems, after applying and trying to uninstall backup_migrate using drush, i get

[Syntax Error] Expected Doctrine\Common\Annotations\DocLexer::T_CLOSE_CURLY_BRACES, got 'canonical' at position 678 in class Drupal\backup_migrate\Entity\SettingsProfile.

stevenpatz’s picture

#9 . Works for me as well. Can we get this commited?

karuna patel’s picture

Status: Needs work » Needs review
StatusFileSize
new427 bytes

attached patch is working fine for me.

Status: Needs review » Needs work
WillenLeal’s picture

The uninstall worked well for me (8.7), what version of Drupal 8.x are guys running?

damienmckenna’s picture

Version: 8.x-4.x-dev » 5.0.x-dev

Moving 8.x-4.x issues to 5.0.x because the older branch is no longer supported.

ivnish’s picture

Version: 5.0.x-dev » 5.1.x-dev
Status: Needs work » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.