Incompatibility with Devel

Created on 29 April 2024, about 2 months ago
Updated 11 June 2024, 17 days ago

Problem/Motivation

When developing locally, I have the Devel module installed and cannot get to the Memory Limit Policy listing page /admin/config/performance/memory-limit-policy/list

Symfony\Component\Routing\Exception\MissingMandatoryParametersException: Some mandatory parameters are missing ("memory_limit_policy") to generate a URL for route "entity.memory_limit_policy.wizard.edit". in Drupal\Core\Routing\UrlGenerator->doGenerate() (line 187 of core/lib/Drupal/Core/Routing/UrlGenerator.php).
Drupal\Core\Routing\UrlGenerator->getInternalPathFromRoute('entity.memory_limit_policy.wizard.edit', Object, Array, Array) (Line: 300)
Drupal\Core\Routing\UrlGenerator->generateFromRoute('entity.memory_limit_policy.wizard.edit', Array, Array, 1) (Line: 108)
Drupal\Core\Render\MetadataBubblingUrlGenerator->generateFromRoute('entity.memory_limit_policy.wizard.edit', Array, Array, 1) (Line: 765)
Drupal\Core\Url->toString(1) (Line: 183)
Drupal\Core\Utility\LinkGenerator->generate(Object, Object) (Line: 95)
Drupal\Core\Render\Element\Link::preRenderLink(Array)

Steps to reproduce

1. Enable Devel module
2. Enable Memory Limit Policy module
3. Create a new memory limit policy
4. Visit the listing page /admin/config/performance/memory-limit-policy/list

πŸ› Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States joncjordan Colorado Springs, CO

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

Comments & Activities

  • Issue created by @joncjordan
  • πŸ‡ΊπŸ‡ΈUnited States joncjordan Colorado Springs, CO
  • πŸ‡«πŸ‡·France vbouchet

    Hi @joncjordan,

    Thanks for reporting. I can reproduce a similar issue.

    The website encountered an unexpected error. Try again later.
    
    Symfony\Component\Routing\Exception\MissingMandatoryParametersException: Some mandatory parameters are missing ("machine_name", "step") to generate a URL for route "entity.memory_limit_policy.devel_load". in Drupal\Core\Routing\UrlGenerator->doGenerate() (line 187 of core/lib/Drupal/Core/Routing/UrlGenerator.php).
    Drupal\Core\Routing\UrlGenerator->getInternalPathFromRoute('entity.memory_limit_policy.devel_load', Object, Array, Array) (Line: 300)
    Drupal\Core\Routing\UrlGenerator->generateFromRoute('entity.memory_limit_policy.devel_load', Array, Array, 1) (Line: 108)
    Drupal\Core\Render\MetadataBubblingUrlGenerator->generateFromRoute('entity.memory_limit_policy.devel_load', Array, Array, 1) (Line: 765)
    Drupal\Core\Url->toString(1) (Line: 183)
    Drupal\Core\Utility\LinkGenerator->generate(Object, Object) (Line: 102)
    Drupal\Core\Render\Element\Link::preRenderLink(Array)
    call_user_func_array(Array, Array) (Line: 111)
    

    It seems devel is trying to add its own route to debug the entity. I need to check why it fails as I do expect this to be very generic and applied to all kind of entity types.

  • πŸ‡«πŸ‡·France vbouchet

    I feel this is some incompatibility between Devel and EntityWizard from Ctools which is used to generate the multistep form.

    I don't think the multistep form add so much value and I was already wondering about removing Ctools dependency to ease the maintenance.

    I will create a specific ticket to remove Ctools dependency and leave this bug open to remember to check it is fixed after Ctools removal.

  • πŸ‡«πŸ‡·France vbouchet

    I have raised a Draft MR in #3444342 πŸ“Œ Remove ctools dependency Active which remove Ctools.

    I can't reproduce the issue anymore and I can see the "Devel" operation in the policy dropdown button.

    I need to perform some more tests before merging the MR and creating a new release.

  • πŸ‡ΊπŸ‡ΈUnited States joncjordan Colorado Springs, CO

    Thanks for looking into it. I've been away from the office but I can help review when I'm back.

  • Status changed to Fixed about 1 month ago
  • πŸ‡«πŸ‡·France vbouchet

    I did some more testing and I am not able to replicate anymore after the last change (removal of ctools). It is merged in 2.x.

    Please reopen if you still face the issue.

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

Production build 0.69.0 2024