Hello.
I use drupal 8.9.1.

When i install the module i have this error :

Symfony\Component\Routing\Exception\RouteNotFoundException: Route "js_delay_strategy.collection" does not exist. in Drupal\Core\Routing\RouteProvider->getRouteByName() (line 208 of core/lib/Drupal/Core/Routing/RouteProvider.php).

Drupal\Core\Routing\UrlGenerator->getRoute('js_delay_strategy.collection') (Line: 130)
Drupal\Core\Routing\UrlGenerator->getPathFromRoute('js_delay_strategy.collection', Array) (Line: 68)
Drupal\Core\Render\MetadataBubblingUrlGenerator->getPathFromRoute('js_delay_strategy.collection', Array) (Line: 799)
Drupal\Core\Url->getInternalPath() (Line: 136)
Drupal\Core\Utility\LinkGenerator->generate('JS delay strategies', Object) (Line: 95)
Drupal\Core\Render\Element\Link::preRenderLink(Array)
call_user_func_array(Array, Array) (Line: 100)
Drupal\Core\Render\Renderer->doTrustedCallback(Array, Array, 'Render #pre_render callbacks must be methods of a class that implements \Drupal\Core\Security\TrustedCallbackInterface or be an anonymous function. The callback was %s. Support for this callback implementation is deprecated in 8.8.0 and will be removed in Drupal 9.0.0. See https://www.drupal.org/node/2966725', 'silenced_deprecation', 'Drupal\Core\Render\Element\RenderCallbackInterface') (Line: 781)
Drupal\Core\Render\Renderer->doCallback('#pre_render', Array, Array) (Line: 372)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 200)
Drupal\Core\Render\Renderer->render(Array) (Line: 501)
Drupal\Core\Template\TwigExtension->escapeFilter(Object, Array, 'html', NULL, 1) (Line: 117)
__TwigTemplate_14f0c47abb77d67a2afe9ac03fc96435a34db9c3ab20bcafdbe42a3687c09388->getmenu_links(Array, Object, 3) (Line: 124)
__TwigTemplate_14f0c47abb77d67a2afe9ac03fc96435a34db9c3ab20bcafdbe42a3687c09388->getmenu_links(Array, Object, 2) (Line: 124)
__TwigTemplate_14f0c47abb77d67a2afe9ac03fc96435a34db9c3ab20bcafdbe42a3687c09388->getmenu_links(Array, Object, 1) (Line: 124)
__TwigTemplate_14f0c47abb77d67a2afe9ac03fc96435a34db9c3ab20bcafdbe42a3687c09388->getmenu_links(Array, Object, 0) (Line: 60)
__TwigTemplate_14f0c47abb77d67a2afe9ac03fc96435a34db9c3ab20bcafdbe42a3687c09388->doDisplay(Array, Array) (Line: 455)
Twig\Template->displayWithErrorHandling(Array, Array) (Line: 422)
Twig\Template->display(Array) (Line: 434)
Twig\Template->render(Array) (Line: 64)
twig_render_template('core/themes/stable/templates/navigation/menu--toolbar.html.twig', Array) (Line: 384)
Drupal\Core\Theme\ThemeManager->render('menu__toolbar', Array) (Line: 431)
Drupal\Core\Render\Renderer->doRender(Array) (Line: 444)
Drupal\Core\Render\Renderer->doRender(Array) (Line: 444)
Drupal\Core\Render\Renderer->doRender(Array) (Line: 444)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 200)
Drupal\Core\Render\Renderer->render(Array) (Line: 93)
template_preprocess_toolbar(Array, 'toolbar', Array) (Line: 287)
Drupal\Core\Theme\ThemeManager->render('toolbar', Array) (Line: 431)
Drupal\Core\Render\Renderer->doRender(Array) (Line: 444)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 200)
Drupal\Core\Render\Renderer->render(Array) (Line: 501)
Drupal\Core\Template\TwigExtension->escapeFilter(Object, Array, 'html', NULL, 1) (Line: 92)
__TwigTemplate_d73aaf2a2012404b79d786ab20c0accb9bc826f81e7778de4eb0eccce690d610->doDisplay(Array, Array) (Line: 455)
Twig\Template->displayWithErrorHandling(Array, Array) (Line: 422)
Twig\Template->display(Array) (Line: 434)
Twig\Template->render(Array) (Line: 64)
twig_render_template('core/themes/stable/templates/layout/html.html.twig', Array) (Line: 384)
Drupal\Core\Theme\ThemeManager->render('html', Array) (Line: 431)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 200)
Drupal\Core\Render\Renderer->render(Array) (Line: 147)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 573)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 148)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
call_user_func(Array, Object, 'kernel.view', Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object) (Line: 156)
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: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 708)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

i can't do anything. could you help me please ?

CommentFileSizeAuthor
#14 libraries_delay_load_php_7-2.patch655 bytesasterovim

Comments

Asterovim created an issue. See original summary.

asterovim’s picture

Issue summary: View changes
vdsh’s picture

Have you tried "drush cr" after enabling the module? If yes, and it doesn't solve the issue, can you let me know where you are experiencing that error?

asterovim’s picture

Yes of course before and after enabling the module (drush cr).

I have tried into two website and same problem.

I have this error into ALL the website. I can't do anything. :(

vdsh’s picture

I am going to have a look in a couple of hours. Can you let me know when exactly does this error occur? Right when you install the module or when on a specific page?

asterovim’s picture

Hello. Just after the end of the install module. And all pages.

(i have installed with drush and drush didn't say any error).

Thanks you :)

  • vdsh committed 8e8f7e3 on 2.1.x
    Issue #3156447 by vdsh: Route "js_delay_strategy.collection" does not...
vdsh’s picture

Indeed there was a small typo but only affecting the "help" part of the module, not the features.
Can you please install 2.1.3 and confirm that your issue is solved?

vdsh’s picture

Status: Active » Needs review
asterovim’s picture

Thanks you.

I have updated to 2.1.3.

Im sorry but when i install the module i have error :

The website encountered an unexpected error. Please try again later.
Error: Call to undefined function Drupal\libraries_delay_load\Asset\array_key_first() in Drupal\libraries_delay_load\Asset\JsDelayer->getStrategy() (line 229 of modules/contrib/libraries_delay_load/src/Asset/JsDelayer.php).
Drupal\libraries_delay_load\Asset\JsDelayer->getStrategy(Array) (Line: 98)
Drupal\libraries_delay_load\Asset\JsDelayer->processAssetArray(Array) (Line: 59)
libraries_delay_load_js_alter(Array, Object, NULL) (Line: 539)
Drupal\Core\Extension\ModuleHandler->alter('js', Array, Object) (Line: 276)
Drupal\Core\Asset\AssetResolver->getJsAssets(Object, ) (Line: 322)
Drupal\Core\Render\HtmlResponseAttachmentsProcessor->processAssetLibraries(Object, Array) (Line: 161)
Drupal\Core\Render\HtmlResponseAttachmentsProcessor->processAttachments(Object) (Line: 94)
Drupal\big_pipe\Render\BigPipeResponseAttachmentsProcessor->processAttachments(Object) (Line: 45)
Drupal\Core\EventSubscriber\HtmlResponseSubscriber->onRespond(Object, 'kernel.response', Object)
call_user_func(Array, Object, 'kernel.response', Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.response', Object) (Line: 191)
Symfony\Component\HttpKernel\HttpKernel->filterResponse(Object, Object, 1) (Line: 173)
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: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 708)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

into all the webs pages.

Could you help me please ? :(

asterovim’s picture

of course i have try

drush cr

:(

vdsh’s picture

From https://www.php.net/manual/en/function.array-key-first.php it seems that this function is only available with php 7.3

Do you have access to that php version? Else can you create the function for older version of php as indicated in the tip of that page.

I'll check how I can include that in the standard version but I won't have time this week.

And this is a different issue to support older versions of php.

asterovim’s picture

Thanks you. I will try. I keep in touch. I use php 7.2. I can't update to php 7.3 into this website :(

asterovim’s picture

StatusFileSize
new655 bytes

Hello. I can confirm. It's work ! Could you update the module with this patch please ?

vdsh’s picture

Thanks for the patch, I'll check it in more depth next week.

  • vdsh committed 65049cf on 2.1.x
    Issue #3156447 by Asterovim, vdsh: Route "js_delay_strategy.collection"...
vdsh’s picture

Status: Needs review » Fixed

Thanks for the patch Asterovim. Automated tests are successful on 7.2 and 7.3. Committed

Status: Fixed » Closed (fixed)

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