Account created on 1 January 2010, almost 15 years ago
#

Recent comments

šŸ‡¹šŸ‡·Turkey rezarez

I recently ran into this error on my Drupal site after enabling the **Backup and Migrate** module:

Uncaught PHP Exception Symfony\Component\Routing\Exception\RouteNotFoundException: "Route "entity.backup_migrate_settings.canonical" does not exist." 
at /var/www/html/your-site/docroot/core/lib/Drupal/Core/Routing/RouteProvider.php line 208

This happened when I was trying to access some admin configuration pages, and it completely threw me off.

#### Root Cause:
Turns out, the route `entity.backup_migrate_settings.canonical` was missing. This is a critical route for the Backup & Migrate module, and if itā€™s not properly registered, the module canā€™t function as expected.

#### How I Fixed It:

Hereā€™s the step-by-step approach I followed to get things working again:

**Add the Missing Route**:
After realizing that the error was caused by a missing route, I opened the `backup_migrate.routing.yml` file (located in `modules/contrib/backup_migrate/backup_migrate.routing.yml`) and added this snippet to define the missing route:

   entity.backup_migrate_settings.canonical:
     path: '/admin/config/development/backup_migrate/settings'
     defaults:
       _entity_form: 'backup_migrate_settings.edit'
       _title: 'Backup and Migrate Settings'
     requirements:
       _permission: 'administer site configuration'
   

3. **Clear the Cache**:
Donā€™t forget to clear the cache after you make changes to the routing file! Hereā€™s the command to do it:

   drush cr

4. **Rebuild the Routes (if needed)**:
If clearing the cache doesnā€™t seem to fix things (which didnā€™t happen for me, but just in case), you can rebuild the routes like this:

   drush router:rebuild
Production build 0.71.5 2024