Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Cant install the module.
Error message:
Symfony\Component\Routing\Exception\RouteNotFoundException: Route "extlink_admin.settings" does not exist. in Drupal\Core\Routing\RouteProvider->getRouteByName() (line 187 of core/lib/Drupal/Core/Routing/RouteProvider.php).
Drupal\Core\Routing\UrlGenerator->getRoute('extlink_admin.settings') (Line: 277)
Drupal\Core\Routing\UrlGenerator->generateFromRoute('extlink_admin.settings', Array, Array, 1) (Line: 105)
Drupal\Core\Render\MetadataBubblingUrlGenerator->generateFromRoute('extlink_admin.settings', Array, Array, ) (Line: 735)
Drupal\Core\Url->toString() (Line: 21)
extlink_install()
call_user_func_array('extlink_install', Array) (Line: 391)
Drupal\Core\Extension\ModuleHandler->invoke('extlink', 'install') (Line: 287)
Drupal\Core\Extension\ModuleInstaller->install(Array, 1) (Line: 83)
Drupal\Core\ProxyClass\Extension\ModuleInstaller->install(Array) (Line: 450)
Drupal\system\Form\ModulesListForm->submitForm(Array, Object)
call_user_func_array(Array, Array) (Line: 111)
Drupal\Core\Form\FormSubmitter->executeSubmitHandlers(Array, Object) (Line: 51)
Drupal\Core\Form\FormSubmitter->doSubmitForm(Array, Object) (Line: 583)
Drupal\Core\Form\FormBuilder->processForm('system_modules', Array, Object) (Line: 314)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 74)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 574)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
call_user_func_array(Object, Array) (Line: 144)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 64)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 99)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 78)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 50)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 652)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
Comment | File | Size | Author |
---|---|---|---|
#8 | patch_2820941.diff | 1.39 KB | LpSolit |
| |||
#5 | extlink-2820941-5.patch | 460 bytes | collin.rickford |
Comments
Comment #1
Anonymous (not verified) CreditAttribution: Anonymous commentedmaxmannen created an issue. See original summary.
Comment #2
elachlan CreditAttribution: elachlan commentedComment #4
LpSolit CreditAttribution: LpSolit commentedThe recent commit doesn't fix this bug but throws the following error instead:
Uncaught PHP Exception InvalidArgumentException: "Class "\\Drupal\\extlink\\src\\Form\\ExtlinkAdminSettingsForm" does not exist."
Comment #5
collin.rickford CreditAttribution: collin.rickford commentedIn routing.yml file, class namespace should be used rather than class location (PSR-4).
\Drupal\extlink\src\Form\ExtlinkAdminSettingsForm
should be\Drupal\extlink\Form\ExtlinkAdminSettingsForm
Patch attached.
Comment #7
LpSolit CreditAttribution: LpSolit as a volunteer commentedI found what the problem is. Per
https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Extension...
hook_install() in extlink.install is not aware of routes defined in extlink.routing.yml, because this hook is called very early. So the message displayed to the admin must be printed by hook_modules_installed() which is called *after* the installation is complete and after new routes in extlink.routing.yml are available.
I have a patch ready. I will upload it in a few minutes.
Comment #8
LpSolit CreditAttribution: LpSolit as a volunteer commentedTested with Drupal 8.2.3 + External Links 8.x-1.0-alpha3.
Comment #10
elachlan CreditAttribution: elachlan commentedThanks.