Some mandatory parameters are missing ("identifier", "bundle") to generate a URL for route "shs.term_data"

Created on 26 March 2024, 9 months ago
Updated 18 April 2024, 8 months ago

Problem/Motivation

Some mandatory parameters are missing ("identifier", "bundle") to generate a URL for route "shs.term_data"

SHS 2.0.0.-rc11 and 3.0.0-alpha2 introduced this new feature:

"- Add a contextual link to the extends (modules listing) , shows up as a gear icon, click it to find the configuration page".

This new line was added to shs.info.yml:

configure: shs.term_data

I can't find an issue for that change.

After upgrading to SHS 2.0.0.-rc11 or 3.0.0-alpha2, when visiting /admin/modules, I see the error below. I am using Drupal 10.2.4.

(p.s. @joseph.olstad Thank you for your hard work in sorting out this module.)

The website encountered an unexpected error. Try again later.

Symfony\Component\Routing\Exception\MissingMandatoryParametersException: Some mandatory parameters are missing ("identifier", "bundle") to generate a URL for route "shs.term_data". in Drupal\Core\Routing\UrlGenerator->doGenerate() (line 187 of core/lib/Drupal/Core/Routing/UrlGenerator.php).
Drupal\Core\Routing\UrlGenerator->getInternalPathFromRoute() (Line: 300)
Drupal\Core\Routing\UrlGenerator->generateFromRoute() (Line: 108)
Drupal\Core\Render\MetadataBubblingUrlGenerator->generateFromRoute() (Line: 765)
Drupal\Core\Url->toString() (Line: 183)
Drupal\Core\Utility\LinkGenerator->generate() (Line: 102)
Drupal\Core\Render\Element\Link::preRenderLink()
call_user_func_array() (Line: 111)
Drupal\Core\Render\Renderer->doTrustedCallback() (Line: 859)
Drupal\Core\Render\Renderer->doCallback() (Line: 421)
Drupal\Core\Render\Renderer->doRender() (Line: 240)
Drupal\Core\Render\Renderer->render() (Line: 475)
Drupal\Core\Template\TwigExtension->escapeFilter() (Line: 166)
__TwigTemplate_195239659a1d3a2dd1af6364d16cfeb1->doDisplay() (Line: 394)
Twig\Template->displayWithErrorHandling() (Line: 367)
Twig\Template->display() (Line: 379)
Twig\Template->render() (Line: 38)
Twig\TemplateWrapper->render() (Line: 39)
twig_render_template() (Line: 348)
Drupal\Core\Theme\ThemeManager->render() (Line: 480)
Drupal\Core\Render\Renderer->doRender() (Line: 493)
Drupal\Core\Render\Renderer->doRender() (Line: 493)
Drupal\Core\Render\Renderer->doRender() (Line: 240)
Drupal\Core\Render\Renderer->render() (Line: 238)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 627)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 231)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare() (Line: 128)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse() (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray()
call_user_func() (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch() (Line: 186)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 58)
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle() (Line: 32)
Drupal\big_pipe\StackMiddleware\ContentLength->handle() (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 36)
Drupal\Core\StackMiddleware\AjaxPageState->handle() (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 704)
Drupal\Core\DrupalKernel->handle() (Line: 19)

Steps to reproduce

1. Install module
2. Enable the module.
3. Go to /admin/modules

🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

🇹🇭Thailand Nick Hope

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @Nick Hope
  • same issue:
    drupal 9.5.11
    php: 8.1.27
    after composer update i have this error on mudule page
    page: https://build.i-c-c.sc1cloutclo.universe.wf/admin/modules
    error:

    Symfony\Component\Routing\Exception\MissingMandatoryParametersException: Some mandatory parameters are missing ("identifier", "bundle") to generate a URL for route "shs.term_data". in Drupal\Core\Routing\UrlGenerator->doGenerate() (line 181 of core/lib/Drupal/Core/Routing/UrlGenerator.php).

    Drupal\Core\Routing\UrlGenerator->getInternalPathFromRoute() (Line: 291)
    Drupal\Core\Routing\UrlGenerator->generateFromRoute() (Line: 105)
    Drupal\Core\Render\MetadataBubblingUrlGenerator->generateFromRoute() (Line: 765)
    Drupal\Core\Url->toString() (Line: 182)
    Drupal\Core\Utility\LinkGenerator->generate() (Line: 95)
    Drupal\Core\Render\Element\Link::preRenderLink()
    call_user_func_array() (Line: 101)
    Drupal\Core\Render\Renderer->doTrustedCallback() (Line: 788)
    Drupal\Core\Render\Renderer->doCallback() (Line: 374)
    Drupal\Core\Render\Renderer->doRender() (Line: 204)
    Drupal\Core\Render\Renderer->render() (Line: 479)
    Drupal\Core\Template\TwigExtension->escapeFilter() (Line: 166)
    __TwigTemplate_eb3f8c7fe71fde9761ecb19de5855f1a->doDisplay() (Line: 405)
    Twig\Template->displayWithErrorHandling() (Line: 378)
    Twig\Template->display() (Line: 390)
    Twig\Template->render() (Line: 55)
    twig_render_template() (Line: 384)
    Drupal\Core\Theme\ThemeManager->render() (Line: 433)
    Drupal\Core\Render\Renderer->doRender() (Line: 446)
    Drupal\Core\Render\Renderer->doRender() (Line: 446)
    Drupal\Core\Render\Renderer->doRender() (Line: 204)
    Drupal\Core\Render\Renderer->render() (Line: 242)
    Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 580)
    Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 243)
    Drupal\Core\Render\MainContent\HtmlRenderer->prepare() (Line: 132)
    Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse() (Line: 90)
    Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray()
    call_user_func() (Line: 142)
    Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch() (Line: 174)
    Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 81)
    Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 58)
    Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
    Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 106)
    Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 85)
    Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 44)
    Drupal\services\StackMiddleware\FormatSetter->handle() (Line: 49)
    Asm89\Stack\Cors->handle() (Line: 168)
    Drupal\purge_queuer_url\StackMiddleware\UrlRegistrar->handle() (Line: 270)
    Drupal\shield\ShieldMiddleware->bypass() (Line: 178)
    Drupal\shield\ShieldMiddleware->handle() (Line: 48)
    Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
    Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 49)
    Drupal\remove_http_headers\StackMiddleware\RemoveHttpHeadersMiddleware->handle() (Line: 23)
    Stack\StackedHttpKernel->handle() (Line: 718)
    Drupal\Core\DrupalKernel->handle() (Line: 19)

  • 🇺🇸United States SocialNicheGuru

    i am getting the same
    Drupal 10.2.4, php8.2, Ubunbtu 22.04lts

  • 🇨🇦Canada darkodev

    Same on Drupal core 10.2.4 after composer upgrading drupal/shs (2.0.0-rc4 => 2.0.0-rc11)

  • Same problem for me on drupal 10.2.4, php 8.3 when upgrading shs module to last version through composer update.

  • 🇺🇸United States mekal

    Same...Drupal core 10.2.4 after composer upgrading drupal/shs (2.0.0-rc4 => 2.0.0-rc11).

    * Removing the configuration line from shs.info.yml seems to fix it...adding a patch if anyone wants it.

  • 🇮🇳India dineshkumarbollu

    #7 fixes the issue in admin/modules, Thanks for the patch @mekal

  • Status changed to Needs review 9 months ago
  • With #7 I confirm that the error is gone as well on my side.
    However, the release note for the 2.0.0-rc11 says:

    "- Add a contextual link to the extends (modules listing) , shows up as a gear icon, click it to find the configuration page".

    Maybe I missed something, but where this gear icon is supposed to be found, as I do not find it in the module list in front of the shs module?

    Thanks,

  • 🇺🇸United States SocialNicheGuru

    or you can stay on rc10 since rc11 only has this breaking addition

  • also still present in 3.0.0-alpha2

  • Status changed to RTBC 9 months ago
  • 🇮🇳India Sivaji_Ganesh_Jojodae Chennai

    I confirm that #7 fixes the issue.

  • 🇮🇳India ananthakrishnan.kr

    #7 fixes the issue in admin/modules, Thanks!

  • 🇵🇹Portugal jrochate

    same here, #7 solves.

  • 🇨🇦Canada Liam Morland Ontario, CA 🇨🇦

    Patch #7 is the same change as reverting the last commit on each branch, with commit message "Contextual link to the config page". This fixes the problem.

  • 🇳🇱Netherlands eelkeblok Netherlands 🇳🇱

    This is a very puzzling addition. The link in the module page is intended for a generic settings page, that has a URL that does not require any arguments. This module has no such URL, the configured route indeed needs several arguments, so is unsuitable to add to the module overview page. Please either apply the patch of revert the commit ASAP.

  • Status changed to Fixed 9 months ago
  • 🇨🇦Canada joseph.olstad

    Sorry for the slip here.

    I Starred this project so that I don't miss the next one.

    https://www.drupal.org/project/shs/releases/2.0.0-rc12
    https://www.drupal.org/project/shs/releases/3.0.0-alpha3

    I recommend 2.0.0-rc12

    3.0.0-alpha3 is available, has added functionality but is lacking a permission check on the add/edit terms functionality. Appreciate any assistance to resolve this so that we can get it into a beta state.

  • 🇨🇦Canada joseph.olstad

    rc12 is working for me in my test environments

  • 🇨🇦Canada Liam Morland Ontario, CA 🇨🇦

    Working for us too. 2.0.0-rc10 is identical to 2.0.0-rc12.

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

Production build 0.71.5 2024