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
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | Screenshot from 2024-03-27 09-12-21.png | 42.03 KB | dineshkumarbollu |
| #7 | shs-project-issue-ajax-form-3436056.patch | 343 bytes | mekal |
Comments
Comment #2
informatique clouturier christophe commentedsame 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
Comment #3
dineshkumarbollu commentedGetting same error on Drupal 9.5 with php 8.1
Comment #4
socialnicheguru commentedi am getting the same
Drupal 10.2.4, php8.2, Ubunbtu 22.04lts
Comment #5
darkodev commentedSame on Drupal core 10.2.4 after composer upgrading drupal/shs (2.0.0-rc4 => 2.0.0-rc11)
Comment #6
arno2mars commentedSame problem for me on drupal 10.2.4, php 8.3 when upgrading shs module to last version through composer update.
Comment #7
mekal commentedSame...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.
Comment #8
dineshkumarbollu commented#7 fixes the issue in
admin/modules, Thanks for the patch @mekalComment #9
viren18febs commentedComment #10
arno2mars commentedWith #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,
Comment #11
socialnicheguru commentedor you can stay on rc10 since rc11 only has this breaking addition
Comment #12
johnwtalso still present in 3.0.0-alpha2
Comment #13
sivaji_ganesh_jojodae commentedI confirm that #7 fixes the issue.
Comment #14
ananthakrishnan.kr commented#7 fixes the issue in admin/modules, Thanks!
Comment #15
jrochate commentedsame here, #7 solves.
Comment #16
liam morlandPatch #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.
Comment #17
eelkeblokThis 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.
Comment #20
joseph.olstadComment #21
joseph.olstadSorry 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.
Comment #22
joseph.olstadComment #23
joseph.olstadrc12 is working for me in my test environments
Comment #24
liam morlandWorking for us too. 2.0.0-rc10 is identical to 2.0.0-rc12.