In hook_install you're creating a route to help.page. That route only exists if the help module is installed. Please add a check around the help message part in hook_install:
$messenger = \Drupal::messenger();
$settings_url = Url::fromRoute('easy_breadcrumb.general_settings_form')->toString();
$help_url = Url::fromRoute('help.page', ['name' => 'easy_breadcrumb'])->toString();
$messenger->addMessage("Easy Breadcrumb settings are found on $settings_url.");
$messenger->addMessage("Easy Breadcrumb documentation is found on $help_url.");
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | interdiff_2-4.txt | 1.31 KB | alexdmccabe |
| #4 | easy_breadcrumb-help_not_installed-3053928-4.patch | 1.55 KB | alexdmccabe |
| #2 | 3053928.2.patch | 1.02 KB | grayle |
Comments
Comment #2
grayle commentedComment #3
sunlixOh yes please. This breaked our site installation via
drush site:install profile_nameeasy_breadcrumb is a default module in our projects. :)
Comment #4
alexdmccabeRerolled the patch to keep the message, catch the exception, and provide a link to install the module if the exception happens.
Comment #5
greg boggsI didn't realize help could be turned off. Pushing a fix and rolling a new release.
Comment #7
greg boggsI went ahead and pushed a new tag for 8.1.11. Can someone confirm that the install works before I publish the release on D.O.? Instead of going with the try catch, I just removed the call to the help module path and linked to the documentation on Drupal.org. I still credited you as the author of course :)
Comment #8
greg boggsWent ahead and published since there was an upgrade path bug as well:
https://www.drupal.org/project/easy_breadcrumb/releases/8.x-1.12
Comment #9
greg boggsLemme know if I missed anything!