Error: "Route 'reviews.settings' does not exist" when enabling Reviews module with Drush

Created on 5 April 2025, 2 days ago

Description:
When attempting to enable the Reviews module using Drush, the following error is thrown:

In RouteProvider.php line 211:

  Route "reviews.settings" does not exist.

Steps to Reproduce:

  1. Install the Reviews module via Composer:
    composer require drupal/reviews:^2.0@beta
  2. Enable the module with Drush:
    drush en reviews

Expected Result:
The module should enable cleanly without throwing routing errors.

Actual Result:
The process fails with:

In RouteProvider.php line 211:

  Route "reviews.settings" does not exist.

Environment Details:

  • Module Version: drupal/reviews 2.0.0-beta1
  • Drupal Core: 11.1.5
  • Drush: 13.4.0
  • PHP: 8.3

Workaround:
N/A – the module is installed, but the settings form cannot be reached.

Notes:
This seems to indicate a missing route definition in the module's *.routing.yml file or a reference to a settings route that was never declared.

I think that only the route to `src/Form/ReviewEntitySettingsForm.php` is missing, I'll create a patch an submit it if it's working

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇩🇪Germany mmbk Meißen

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @mmbk
  • 🇬🇧United Kingdom aaron.ferris

    aaron.ferris made their first commit to this issue’s fork.

  • 🇬🇧United Kingdom aaron.ferris

    Had a look at this, seems the settings form is on a entity type by entity type basis now, unless im missing something. Perhaps there was a general settings form previously that's now gone? Raised an MR.

  • 🇩🇪Germany mmbk Meißen

    @aaron.ferris havin the route in reviews..info.yml is helpful, but it was still not defined.

    I added it to the reviews.routing.yml so that it is accessible. Still missing the menu entries so that the setting form is available from the structe-menu.

  • 🇩🇪Germany mmbk Meißen
  • 🇩🇪Germany mmbk Meißen

    Tested a bit more - the route is correctly created (without these patches) when the module is installed from the backend via ui. Then the `ReviewEntityHtmlRouteProvider` is working as expected.

    But the drush installation fails.

    Actually, I'm not sure whether the `ReviewEntityHtmlRouteProvider` is needed, if the `Drupal\Core\Entity\Routing\AdminHtmlRouteProvider` were used, all CRUD routes will be created, and the settings route can be easily created with the `reviews.routing.yml`

Production build 0.71.5 2024