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}

Command icon 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

l_langill created an issue. See original summary.

l_langill’s picture

Issue tags: +Page Manager, +Devel

I have, so far traced the issue to an update to Devel. That is the change in the versioning repot where this issue starts.

l_langill’s picture

Downgrading 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.

sfcamil’s picture

Hi,
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.

mediabounds’s picture

StatusFileSize
new1014 bytes

In 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-load route. 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_ui module to alter the link template used by devel-load (if Devel is present).

mediabounds’s picture

Status: Active » Needs review

amanmansuri72 made their first commit to this issue’s fork.

sfcamil’s picture

Hello,

I can confirm, this patch working for me.
THX mediabounds

amanbtr72’s picture

Status: Needs review » Needs work
StatusFileSize
new78.87 KB
new183.52 KB

The patch is working fine, but it has one more issue not working on devel URL.

Please find the screenshot for further reference.

anybody’s picture

Version: 8.x-4.0-rc2 » 8.x-4.x-dev
Priority: Major » Critical

Same issue here, page manager ui is inaccessible.

anybody’s picture

#5 fixes the issue, I'm just not sure if it's the correct fix.

yurg’s picture

Had to add two more Devel-related routes to #5 for Drupal 10.2.6 / Page Manager 4.0.0-rc2.

if ($entity_types['page']->hasLinkTemplate('devel-definition')) {
    $entity_types['page']->setLinkTemplate('devel-definition', '/devel/page/{page}');
  }
  if ($entity_types['page']->hasLinkTemplate('devel-load-with-references')) {
    $entity_types['page']->setLinkTemplate('devel-load-with-references', '/devel/page/{page}');
  }
amal.bukhari’s picture

I got around this by uninstalling the devel module using drush drush un devel.

l_langill’s picture

Status: Needs work » Fixed

The patch in #5 works like a charm.

anybody’s picture

Status: Fixed » Reviewed & tested by the community

@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.

superlolo95’s picture

#WOrks for me

japerry’s picture

Priority: Critical » Normal
Status: Reviewed & tested by the community » Needs work

Not 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.

mediabounds’s picture

FWIW, 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.

anybody’s picture

Agree with #18! Thanks for the summary.

Anybody changed the visibility of the branch 3438993-some-mandatory-parameters to hidden.

Anybody changed the visibility of the branch 3438993-some-mandatory-parameters to active.

anybody’s picture

Status: Needs work » Needs review

@japerry: I agree with

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.

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.

anybody’s picture

StatusFileSize
new1.46 KB

Static patch attached, if someone needs it in the meantime!
https://www.drupal.org/files/issues/2024-08-14/page-manager-3438993-MR34...

anybody’s picture

FYI: Just tried the patch for my case and it fixes all the issues with devel.

dasj19’s picture

Thanks, Latest patch works like a charm on the latest 4.0.0-rc3.

ben.campbell’s picture

#patch24 worked great thank you

p4trizio’s picture

Status: Needs review » Reviewed & tested by the community

patch #24 worked great thank you

peter pulsifer’s picture

I agree with #18 and #23, and I greatly appreciate the patch#24 !

smulvih2’s picture

+1 RTBC

anybody’s picture

@japerry could you have a look at #23 maybe and tell us, if you'd be fine with that?

jschref’s picture

Patch 24 works great for me too.

marco.b’s picture

patch #24 worked great thank you!

bluegeek9’s picture

Patch #24 fixed the error.

joseph.olstad’s picture

Priority: Normal » Major

devel is an important tool and for DX, +1 here

goz’s picture

Error disappear after applying patch in #24
Thanks !

ipumpkin’s picture

+1 RTBC

lscalado’s picture

+1 RTBC

vitaliyb98’s picture

+1 RTBC

anybody’s picture

Could someone please ping a maintainer or request (Co-)maintainership? This major issue is open for far to long...

joelpittet made their first commit to this issue’s fork.

joelpittet’s picture

We use this patch ourselves but a bit hesitant to commit because the coupling to devel and missing the devel-path-alias

joelpittet’s picture

Status: Reviewed & tested by the community » Fixed

Ok 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 🤷‍♂️

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

  • joelpittet committed cc4f57e1 on 8.x-4.x authored by anybody
    fix: #3438993 Preserve Devel page routes when altering Page Manager link...

Status: Fixed » Closed (fixed)

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