after installing the module I get the following error:
Uncaught PHP Exception Symfony\Component\Routing\Exception\RouteNotFoundException: "Route "acquia_connector.setup" does not exist." at core/lib/Drupal/Core/Routing/RouteProvider.php line 176
but the module is enabled successfully

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

reszli created an issue. See original summary.

reszli’s picture

the issues is caused by the message "Connect your site to the Acquia Subscription now." generated on every page refresh
at the initial page load after the module is enabled line 128 fails in acquia_connector/src/EventSubscriber/InitSubscriber.php
line 128: '@settings' =>Url::fromRoute('acquia_connector.setup')->toString(),
the route is not (yet) available for some reason at this point

BTW, this message should not show up, when I'm already on the Acquia Connector settings pages...

Stanislav Mixnovich’s picture

Assigned: Unassigned » Stanislav Mixnovich
Status: Active » Needs review

I can't reproduce. Try again install version 8.x-1.x-DEV.

IT-Cru’s picture

I got same error message, when I try to activate acquia_connector (git revision: ac830c314ff7d856c36e6cc2a1d413e9f5207683) on D8RC1.

Could only uninstall acquia_connector with 'drush pm-uninstall acquia_connector'.

Stanislav Mixnovich’s picture

I think that the problem is in the file system, you must provide appropriate permission for writing into the temporary directory.

jason_purdy’s picture

I also have this same error message on an Acquia Free Cloud environment that has a fresh setup and core update to 8.0.1. I can confirm that my temp folder is setup and has the appropriate permissions for writing into that directory. I do have a file system error on my status report:

The directory /mnt/www/html/EXAMPLE/docroot/../config/default does not exist. You may need to set the correct directory at the file system settings page or change the current directory's permissions so that it is writable.

I have a feeling that if I can resolve the file directory issue, then this will work. The problem is that the file directory seems to be setup ok. It's using sites/default/file</code>s. I don't know why the UI reports <code>/mnt/www/html/EXAMPLE/docroot/../config/default.

Stanislav Mixnovich’s picture

snufkin’s picture

I can reproduce it - this happens when I try to install Acquia Connector. I've tested this with the stable version (1.0), and I get the following error:

Uncaught PHP Exception Symfony\Component\Routing\Exception\RouteNotFoundException: "Route "acquia_connector.setup" does not exist." at .../docroot/core/lib/Drupal/Core/Routing/RouteProvider.php line 191 request_id="v-cbf63d16-d3ca-11e5-947f-22000b0cee50"

This is odd, because the route definition itself is there and it works. Could it be a core bug?

The error only apperars on first install. It is present in the hook_requirements, could it be that routes are not yet initialised at that point?

snufkin’s picture

This can be resolved by adding a \Drupal::service('router.builder')->rebuild(); line to the hook_requirements. I'm not sure how great of an idea this is however, as it may have performance implications.

Here is an initial patch, that forces the router rebuild, but please mind that this may have severe performance impact and should not be used on production until it is reviewed.

snufkin’s picture

I think this is a core issue #2589967: Rebuild routes immediately when modules are installed, it will work when it gets fixed in core. Marking it won't fix as a result.

snufkin’s picture

Status: Needs review » Closed (works as designed)