Hello,

On the last dev version (http://cgit.drupalcode.org/fontyourface/commit/?id=e17ece1c9d8b0030da732...), when enabling the base module and a provider (for example Google fonts).

There is a fatal error due to the missing route "font.settings":

Le site Web a rencontré une erreur inattendue. Veuillez essayer de nouveau plus tard.Symfony\Component\Routing\Exception\RouteNotFoundException: Route "font.settings" does not exist. in Drupal\Core\Routing\RouteProvider->getRouteByName() (line 190 of core/lib/Drupal/Core/Routing/RouteProvider.php).

Drupal\Core\Routing\UrlGenerator->getRoute('font.settings') (Line: 271)
Drupal\Core\Routing\UrlGenerator->generateFromRoute('font.settings', Array, Array, 1) (Line: 105)
Drupal\Core\Render\MetadataBubblingUrlGenerator->generateFromRoute('font.settings', Array, Array, 1) (Line: 753)
Drupal\Core\Url->toString(1) (Line: 167)
Drupal\Core\Utility\LinkGenerator->generate('@font-your-face settings', Object) (Line: 608)
Drupal::l('@font-your-face settings', Object) (Line: 16)
google_fonts_api_install()
call_user_func_array('google_fonts_api_install', Array) (Line: 391)
Drupal\Core\Extension\ModuleHandler->invoke('google_fonts_api', 'install') (Line: 298)
Drupal\Core\Extension\ModuleInstaller->install(Array, 1) (Line: 83)
Drupal\Core\ProxyClass\Extension\ModuleInstaller->install(Array) (Line: 448)
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: 585)
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: 582)
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: 153)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
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: 38)
Drupal\webprofiler\StackMiddleware\WebprofilerMiddleware->handle(Object, 1, 1) (Line: 50)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 657)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

Comments

Grimreaper created an issue. See original summary.

grimreaper’s picture

Assigned: Unassigned » grimreaper

I will provide a patch soon.

grimreaper’s picture

Assigned: grimreaper » Unassigned
Status: Active » Needs review
StatusFileSize
new10.03 KB
new2.74 KB

Here are two patches.

One that do the minimum fix for enabling the main module and a provider.

The other one to use the routing.yml file to declare the font.settings route. This one is optional.

  • BTMash committed 1d4658c on 8.x-3.x authored by Grimreaper
    Issue #2936698 by Grimreaper: Error when enabling base module and a...
btmash’s picture

I'm not sure on the second patch but am welcome to looking at it in a separate issue. The first one looks great, however. I've committed your patch to the repo. Thank you for all your hard work :)

btmash’s picture

Status: Needs review » Fixed
grimreaper’s picture

Thanks for your feedback and the merge.

I have opened a new issue #2941213: Declare font.settings route using yml file instead of dynamically about the second patch.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.