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

Comments

Nick Hope created an issue. See original summary.

informatique clouturier christophe’s picture

same issue:
php: 8.1.27

update to
drupal 9.5.11
/admin/modules in error

i have tried with composer the version:
composer require 'drupal/shs:^3.0@alpha'
+ drush cr
and
composer require 'drupal/shs:^2.0@RC'
+ drush cr
same issue

drush pm:uninstall shs + drush cr
/admin/modules work fine

dineshkumarbollu’s picture

Issue summary: View changes

Getting same error on Drupal 9.5 with php 8.1

socialnicheguru’s picture

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

darkodev’s picture

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

arno2mars’s picture

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

mekal’s picture

StatusFileSize
new343 bytes

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.

dineshkumarbollu’s picture

StatusFileSize
new42.03 KB

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

viren18febs’s picture

Status: Active » Needs review
arno2mars’s picture

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,

socialnicheguru’s picture

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

johnwt’s picture

also still present in 3.0.0-alpha2

sivaji_ganesh_jojodae’s picture

Status: Needs review » Reviewed & tested by the community

I confirm that #7 fixes the issue.

ananthakrishnan.kr’s picture

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

jrochate’s picture

same here, #7 solves.

liam morland’s picture

Version: 2.0.0-rc11 » 2.0.x-dev

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.

eelkeblok’s picture

This is a very puzzling addition. (I think this is one of those things where you think, "ah, what harm could it do, I'll just commit it"; we've all been there).

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 or revert the commit ASAP.

  • joseph.olstad committed e3e6c9c9 on 3.0.x
    Issue #3436056 by mekal, dineshkumarbollu, SocialNicheGuru, Arno2Mars,...

  • joseph.olstad committed 10e7cfde on 2.0.x
    Issue #3436056 by mekal, dineshkumarbollu, SocialNicheGuru, Arno2Mars,...
joseph.olstad’s picture

Status: Reviewed & tested by the community » Fixed
joseph.olstad’s picture

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.

joseph.olstad’s picture

Issue summary: View changes
joseph.olstad’s picture

rc12 is working for me in my test environments

liam morland’s picture

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

Status: Fixed » Closed (fixed)

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