When trying to access our Page Manager (/admin/structure/page_manager) I am getting an error that reads 'Some mandatory parameters are missing ("machine_name", "step") to generate a URL for route "entity.page.devel_load".'
Location
/en/admin/structure/page_manager
Message
Symfony\Component\Routing\Exception\MissingMandatoryParametersException: Some mandatory parameters are missing ("machine_name", "step") to generate a URL for route "entity.page.devel_load". in Drupal\Core\Routing\UrlGenerator->doGenerate() (line 187 of ./html/core/lib/Drupal/Core/Routing/UrlGenerator.php).
Backtrace
#0 ./html/core/lib/Drupal/Core/Routing/UrlGenerator.php(256): Drupal\Core\Routing\UrlGenerator->doGenerate()
#1 ./html/core/lib/Drupal/Core/Routing/UrlGenerator.php(300): Drupal\Core\Routing\UrlGenerator->getInternalPathFromRoute()
#2 ./html/core/lib/Drupal/Core/Render/MetadataBubblingUrlGenerator.php(108): Drupal\Core\Routing\UrlGenerator->generateFromRoute()
#3 ./html/core/lib/Drupal/Core/Url.php(765): Drupal\Core\Render\MetadataBubblingUrlGenerator->generateFromRoute()
#4 ./html/core/lib/Drupal/Core/Utility/LinkGenerator.php(191): Drupal\Core\Url->toString()
#5 ./html/core/lib/Drupal/Core/Render/Element/Link.php(102): Drupal\Core\Utility\LinkGenerator->generate()
#6 [internal function]: Drupal\Core\Render\Element\Link::preRenderLink()
#7 ./html/core/lib/Drupal/Core/Security/DoTrustedCallbackTrait.php(111): call_user_func_array()
#8 ./html/core/lib/Drupal/Core/Render/Renderer.php(858): Drupal\Core\Render\Renderer->doTrustedCallback()
#9 ./html/core/lib/Drupal/Core/Render/Renderer.php(421): Drupal\Core\Render\Renderer->doCallback()
#10 ./html/core/lib/Drupal/Core/Render/Renderer.php(240): Drupal\Core\Render\Renderer->doRender()
#11 ./html/core/lib/Drupal/Core/Template/TwigExtension.php(475): Drupal\Core\Render\Renderer->render()
#12 ./html/sites/default/files/php/twig/660ff4a671827_links.html.twig_7BcdS4ToSaquLf9gi-PqhFOpZ/UWX8dpHwhi4o_WEI5GhPeEEbbdl6wiE-Zof3aV1unbs.php(77): Drupal\Core\Template\TwigExtension->escapeFilter()
#13 ./vendor/twig/twig/src/Template.php(394): __TwigTemplate_5863b80d33ea102d9227c25035d3931a->doDisplay()
#14 ./vendor/twig/twig/src/Template.php(367): Twig\Template->displayWithErrorHandling()
#15 ./vendor/twig/twig/src/Template.php(379): Twig\Template->display()
#16 ./vendor/twig/twig/src/TemplateWrapper.php(38): Twig\Template->render()
#17 ./html/core/themes/engines/twig/twig.engine(39): Twig\TemplateWrapper->render()
#18 ./html/core/lib/Drupal/Core/Theme/ThemeManager.php(354): twig_render_template()
#19 ./html/core/lib/Drupal/Core/Render/Renderer.php(480): Drupal\Core\Theme\ThemeManager->render()
#20 ./html/core/lib/Drupal/Core/Render/Renderer.php(240): Drupal\Core\Render\Renderer->doRender()
#21 ./html/core/lib/Drupal/Core/Template/TwigExtension.php(475): Drupal\Core\Render\Renderer->render()
#22 ./html/sites/default/files/php/twig/660ff4a671827_table.html.twig_yWFf9uYi5-FFCddtbvZ2RD9b7/Okm4dQhIfQ8HhzdmEMW5j2gv4f6UXGpjhjineFi6I2U.php(179): Drupal\Core\Template\TwigExtension->escapeFilter()
#23 ./vendor/twig/twig/src/Template.php(394): __TwigTemplate_9513fc231e96058873908c794df5608c->doDisplay()
#24 ./vendor/twig/twig/src/Template.php(367): Twig\Template->displayWithErrorHandling()
#25 ./vendor/twig/twig/src/Template.php(379): Twig\Template->display()
#26 ./vendor/twig/twig/src/TemplateWrapper.php(38): Twig\Template->render()
#27 ./html/core/themes/engines/twig/twig.engine(39): Twig\TemplateWrapper->render()
#28 ./html/core/lib/Drupal/Core/Theme/ThemeManager.php(354): twig_render_template()
#29 ./html/core/lib/Drupal/Core/Render/Renderer.php(480): Drupal\Core\Theme\ThemeManager->render()
#30 ./html/core/lib/Drupal/Core/Render/Renderer.php(493): Drupal\Core\Render\Renderer->doRender()
#31 ./html/core/lib/Drupal/Core/Render/Renderer.php(240): Drupal\Core\Render\Renderer->doRender()
#32 ./html/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(238): Drupal\Core\Render\Renderer->render()
#33 ./html/core/lib/Drupal/Core/Render/Renderer.php(627): Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}()
#34 ./html/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(231): Drupal\Core\Render\Renderer->executeInRenderContext()
#35 ./html/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(128): Drupal\Core\Render\MainContent\HtmlRenderer->prepare()
#36 ./html/core/lib/Drupal/Core/EventSubscriber/MainContentViewSubscriber.php(90): Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse()
#37 [internal function]: Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray()
#38 ./html/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(111): call_user_func()
#39 ./vendor/symfony/http-kernel/HttpKernel.php(186): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch()
#40 ./vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
#41 ./html/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle()
#42 ./html/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle()
#43 ./html/core/lib/Drupal/Core/StackMiddleware/ContentLength.php(28): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
#44 ./html/core/modules/big_pipe/src/StackMiddleware/ContentLength.php(32): Drupal\Core\StackMiddleware\ContentLength->handle()
#45 ./html/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\big_pipe\StackMiddleware\ContentLength->handle()
#46 ./html/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass()
#47 ./html/modules/contrib/shield/src/ShieldMiddleware.php(270): Drupal\page_cache\StackMiddleware\PageCache->handle()
#48 ./html/modules/contrib/shield/src/ShieldMiddleware.php(226): Drupal\shield\ShieldMiddleware->bypass()
#49 ./html/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\shield\ShieldMiddleware->handle()
#50 ./html/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
#51 ./html/core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php(36): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
#52 ./html/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\AjaxPageState->handle()
#53 ./html/core/lib/Drupal/Core/DrupalKernel.php(704): Drupal\Core\StackMiddleware\StackedHttpKernel->handle()
#54 ./html/index.php(19): Drupal\Core\DrupalKernel->handle()
#55 {main}
| Comment | File | Size | Author |
|---|---|---|---|
| #24 | page-manager-3438993-MR34-24.patch | 1.46 KB | anybody |
| #9 | localhost-drupal10-devel-page-node_view.png | 183.52 KB | amanbtr72 |
| #9 | Pages-drupal10.png | 78.87 KB | amanbtr72 |
| #5 | 3438993-5.patch | 1014 bytes | mediabounds |
Issue fork page_manager-3438993
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
l_langill commentedI have, so far traced the issue to an update to Devel. That is the change in the versioning repot where this issue starts.
Comment #3
l_langill commentedDowngrading Devel to 5.1.2 has cleared up the issue.
I have not gone into the code to see what has changed and why this is happening as yet.
Comment #4
sfcamil commentedHi,
I have exactly the same problem.
With admin/structure/page_manager I see the same error but if I go directly with admin/structure/page_manager/manage/home_page/general the I can work with my page.
Comment #5
mediabounds commentedIn Devel 5.1.x, Devel wouldn't try to alter the entity info due to how Page manager has a custom link template for editing the Page entity.
Devel 5.2.x changes that logic to always generate a Devel link template for the
devel-loadroute. The route parameters in the custom edit link for the Page entity do not align with what Devel expects which ultimately is what causes this exception.The attached patch updates the
page_manager_uimodule to alter the link template used bydevel-load(if Devel is present).Comment #6
mediabounds commentedComment #8
sfcamil commentedHello,
I can confirm, this patch working for me.
THX mediabounds
Comment #9
amanbtr72 commentedThe patch is working fine, but it has one more issue not working on devel URL.
Please find the screenshot for further reference.
Comment #10
anybodySame issue here, page manager ui is inaccessible.
Comment #11
anybody#5 fixes the issue, I'm just not sure if it's the correct fix.
Comment #12
yurg commentedHad to add two more Devel-related routes to #5 for Drupal 10.2.6 / Page Manager 4.0.0-rc2.
Comment #13
amal.bukhari commentedI got around this by uninstalling the devel module using drush
drush un devel.Comment #14
l_langill commentedThe patch in #5 works like a charm.
Comment #15
anybody@l_langill: I don't think this was committed? So please don't change the status to "fixed"! Read https://www.drupal.org/docs/develop/issues
Based on the feedback I'm setting this RTBC but the maintainers should please decide if this patch is an acceptable solution.
Comment #16
superlolo95 commented#WOrks for me
Comment #17
japerryNot quite sure what I want to do with this, as it seems to be a problem with devel more than Page Manager.. I'd rather not put devel specific code in the PM ui.
Comment #18
mediabounds commentedFWIW, I was torn whether to submit a patch to devel or to page manager on this. Devel needs to be able to generate routes and makes a mostly reasonable, albeit broad, assumption about the format of the edit link template. This works in most cases...unless an entity type changes their edit link template to have additional route parameters like how page manager UI does.
So either devel has to have page manager specific code or page manager needs devel specific code to resolve this. Since page manager UI is altering the convention used by most entities for an edit link template, it seemed reasonable to have it also fix the devel route, if devel was present.
Comment #19
anybodyAgree with #18! Thanks for the summary.
Comment #23
anybody@japerry: I agree with
Do you also agree?
I prepared MR!34 based on #5 and #12 thank you!
Please review.
Page Manager UI is currently unusable with Devel enabled, so I think priority is still major, but I didn't set it higher again as of #17 FYI.
Comment #24
anybodyStatic patch attached, if someone needs it in the meantime!
https://www.drupal.org/files/issues/2024-08-14/page-manager-3438993-MR34...
Comment #25
anybodyFYI: Just tried the patch for my case and it fixes all the issues with devel.
Comment #26
dasj19 commentedThanks, Latest patch works like a charm on the latest 4.0.0-rc3.
Comment #27
ben.campbell commented#patch24 worked great thank you
Comment #28
p4trizio commentedpatch #24 worked great thank you
Comment #29
peter pulsifer commentedI agree with #18 and #23, and I greatly appreciate the patch#24 !
Comment #30
smulvih2+1 RTBC
Comment #31
anybody@japerry could you have a look at #23 maybe and tell us, if you'd be fine with that?
Comment #32
jschref commentedPatch 24 works great for me too.
Comment #33
marco.bpatch #24 worked great thank you!
Comment #34
bluegeek9 commentedPatch #24 fixed the error.
Comment #35
joseph.olstaddevel is an important tool and for DX, +1 here
Comment #36
goz commentedError disappear after applying patch in #24
Thanks !
Comment #37
ipumpkin+1 RTBC
Comment #38
lscalado commented+1 RTBC
Comment #39
vitaliyb98 commented+1 RTBC
Comment #40
anybodyCould someone please ping a maintainer or request (Co-)maintainership? This major issue is open for far to long...
Comment #42
joelpittetWe use this patch ourselves but a bit hesitant to commit because the coupling to
develand missing thedevel-path-aliasComment #43
joelpittetOk I re read @mediabound's #18 and I agree. Similar reservations as japerry though. Wanted to pick a side though or we end up with the same issue that D7 had with token vs entity should we do hyphen or underscore... and then we got bloated both because nobody caved... so I am caving 🤷♂️