In Drupal 8.1.x (doesn't seem to happen in 8.0.x), when I enable Honeypot in the admin UI (modules/extend page), I see:

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

In the logs:

Symfony\Component\Routing\Exception\RouteNotFoundException: Route "honeypot.config" does not exist. in Drupal\Core\Routing\RouteProvider->getRouteByName() (line 191 of /var/www/drupalvm/drupal/core/lib/Drupal/Core/Routing/RouteProvider.php).

I seem to remember specifically fixing this bug elsewhere by switching the code in hook_install() to use Url::fromUri... but my memory is quite foggy on that at this point.

Here's the current code in 8.x-1.x:

/**
 * Implements hook_install().
 */
function honeypot_install() {
  if (PHP_SAPI !== 'cli') {
    $config_url = Url::fromUri('base://admin/config/content/honeypot');
    drupal_set_message(t("Honeypot installed successfully. Please @link to protect your forms from spam bots.", [
      '@link' => \Drupal::l(t('configure Honeypot'), $config_url),
    ]));
  }
}

Whatever the case, even though the module installs successfully, this error-on-install is quite jarring, and I'd like to get it fixed.

Comments

geerlingguy created an issue. See original summary.

geerlingguy’s picture

geerlingguy’s picture

geerlingguy’s picture

mr.baileys’s picture

Hmmm, I'm unable to reproduce this on a stock D8.1 HEAD with Honeypot 8.x-1.x HEAD locally. I've also installed Honeypot on D8.1.x through Simplytest.me, and am not running into this problem there either. Are you using any non-default settings or services?

geerlingguy’s picture

Assigned: Unassigned » geerlingguy
Category: Bug report » Support request
Status: Active » Postponed (maintainer needs more info)

Hmm... Maybe I have something strange in my environment... I'll check into it and close if I can't reproduce.

geerlingguy’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

Huh... I must've had some weird state associated with one of my local VM installs, because after wiping everything and reinstalling/re-cloning core from scratch, it's working fine in 8.1.0-dev and 8.0.0-dev.