Some mandatory parameters are missing ("machine_name", "step") to generate a URL for route "entity.page.devel_load".

Created on 5 April 2024, 9 months ago

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}

๐Ÿ› Bug report
Status

Active

Version

4.0

Component

Miscellaneous

Created by

๐Ÿ‡จ๐Ÿ‡ฆCanada l_langill

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

Merge Requests

Comments & Activities

  • Issue created by @l_langill
  • ๐Ÿ‡จ๐Ÿ‡ฆCanada l_langill

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

  • ๐Ÿ‡จ๐Ÿ‡ฆCanada l_langill

    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.

  • ๐Ÿ‡ง๐Ÿ‡ชBelgium sfcamil

    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.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States mediabounds

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

  • Status changed to Needs review 8 months ago
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States mediabounds
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia amanbtr72

    amanmansuri72 โ†’ made their first commit to this issueโ€™s fork.

  • ๐Ÿ‡ง๐Ÿ‡ชBelgium sfcamil

    Hello,

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

  • Status changed to Needs work 8 months ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia amanbtr72

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

    Please find the screenshot for further reference.

  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany Anybody Porta Westfalica

    Same issue here, page manager ui is inaccessible.

  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany Anybody Porta Westfalica

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

  • ๐Ÿ‡ธ๐Ÿ‡ฐSlovakia yurg

    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}');
      }
    
  • ๐Ÿ‡ฒ๐Ÿ‡พMalaysia amal.bukhari

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

  • Status changed to Fixed 6 months ago
  • ๐Ÿ‡จ๐Ÿ‡ฆCanada l_langill

    The patch in #5 works like a charm.

  • Status changed to RTBC 6 months ago
  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany Anybody Porta Westfalica

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

  • Status changed to Needs work 6 months ago
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States japerry KVUO

    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.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States mediabounds

    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.

  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany Anybody Porta Westfalica

    Agree with #18! Thanks for the summary.

  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany Anybody Porta Westfalica

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

  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany Anybody Porta Westfalica

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

  • Merge request !34Applied patch #5 by @mediabounds โ†’ (Open) created by Anybody
  • Pipeline finished with Canceled
    4 months ago
    Total: 178s
    #253640
  • Status changed to Needs review 4 months ago
  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany Anybody Porta Westfalica

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

  • Pipeline finished with Success
    4 months ago
    Total: 338s
    #253641
  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany Anybody Porta Westfalica

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

  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany Anybody Porta Westfalica

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

  • ๐Ÿ‡ฉ๐Ÿ‡ฐDenmark dasj19

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

  • ๐Ÿ‡ฆ๐Ÿ‡บAustralia ben.campbell

    #patch24 worked great thank you

  • Status changed to RTBC about 21 hours ago
  • ๐Ÿ‡ฎ๐Ÿ‡นItaly p4trizio Como

    patch #24 worked great thank you

Production build 0.71.5 2024