Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When there is an entity_browser and devel installed - no way to load browsers list when devel is enabled because of
Uncaught PHP Exception Symfony\\Component\\Routing\\Exception\\MissingMandatoryParametersException: "Some mandatory parameters are missing ("machine_name", "step") to generate a URL for route "entity.entity_browser.devel_load"." at /var/www/docroot/core/lib/Drupal/Core/Routing/UrlGenerator.php line 171, referer: http://drupal.192.168.56.132.xip.io/admin/config/content/embed/button/manage/block
Disabling devel helps
Comment | File | Size | Author |
---|---|---|---|
#16 | interdiff-6-16.txt | 6.37 KB | LOBsTerr |
#16 | 2726209-16.patch | 7.74 KB | LOBsTerr |
#6 | 2726209-6.patch | 9.02 KB | LOBsTerr |
Issue fork devel-2726209
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:
- 2726209-mandatory-parameters-are changes, plain diff MR !2
Comments
Comment #2
willzyx CreditAttribution: willzyx commented@podarok thanks for reporting
can you indicate the steps to reproduce this issue on a clean installation?
I have played a little with entity_browser anf the test module entity_browser_test but I cannot reproduce the issue
Also, what version of devel you use?
Some time ago we had some problems with ctools wizards that produce the same exception (see #2643790: edit-form in ctools_wizard_test's ExampleConfigEntity incompatible with Devel) but the problems was solved in #2644152: Devel Load does not work for Ctools entity wizards.
Please can you install the latest dev version and see if the issue is still reproducible?
Comment #3
willzyx CreditAttribution: willzyx commentedComment #4
willzyx CreditAttribution: willzyx commentedClosing for lack of activity. Feel free to reopen if the issue still exists
Comment #5
LOBsTerr CreditAttribution: LOBsTerr at European Commission and European Union Institutions, Agencies and Bodies commentedThis issue appears if we have the canonical with two parameters for example like for group module GroupContent
Steps to reproduce
1) Install group and devel
2) Create a group
3) Open URL: devel/group_content/1 (or any other Ids available in your db)
More information could be found here #3088833: WSOD with group module: Some mandatory parameters are missing ("group") to generate a URL for route "entity.group.devel_load".
Comment #6
LOBsTerr CreditAttribution: LOBsTerr at European Commission and European Union Institutions, Agencies and Bodies commented1) This patch dynamically builds route with all parameters from the current entity routes
2) This patch dynamically adds all parameters from the current entity routes
This will build the URLs correctly and will not cause exception from the previous comment.
I have change the structure of URLs.
from devel/group_content/[ID]/definition to devel/definition/group_content/[id1]/[id2]
from devel/group_content/[ID]/render to devel/render/group_content/[id1]/[id2]
We can keep the old URLs, but I believe like this it looks better.
Comment #7
jonathan1055 CreditAttribution: jonathan1055 as a volunteer commentedHi @LOBsTerr,
Are you actually using Devel 8.x-1.x? This issue was started 3 1/2 years ago when 1.x was the only D8 branch. Is this a 2.x or 3.x problem?
Comment #8
LOBsTerr CreditAttribution: LOBsTerr at European Commission and European Union Institutions, Agencies and Bodies commented@jonathan1055, This issue exists in many places. Even the ticket is old it can still appear for any entity routes, which use more than one parameter in their route. Devel takes into account only the current entity parameter.
Another place, where it happens is webform, but they found kind of work around.
This is a route.
This is a workaround
Also they've added some routes, which will not throw the exceptions.
My proposal is to take all available parameters in the route when we set a link for an entity and then add then to a route which we set for the link.
I am not sure if it is the best way to handle it, but it works.
Comment #9
jonathan1055 CreditAttribution: jonathan1055 as a volunteer commentedOK, so I've changed the issue version. Note that testig on d.o. is currently broken for 8.8 so we have to test at 8.9
Comment #10
Javier_Rey CreditAttribution: Javier_Rey commentedI have a custom entity, with paths like "/user/{user}/documents/{document}". When entering the devel tab of the "document" entity, the WSOD appeared.
This patch solves that issue, but when I try to reinstall my module, I get the error "Recursive router rebuild detected".
Core: 9.2.0
Devel: 4.1.1
Comment #11
interdruper CreditAttribution: interdruper commentedSame problems that #10 with this patch: "Recursive router rebuild detected" when installing modules.
Comment #12
jonathan1055 CreditAttribution: jonathan1055 as a volunteer commentedHi @interdruper
The Devel module has now been migrated to https://gitlab.com/drupalspoons/devel within DrupalSpoons the home for Drupal modules on GitLab. All development, bug fixes and testing will be done over there.
This issue is now at https://gitlab.com/drupalspoons/devel/-/issues/256
Comment #16
LOBsTerr CreditAttribution: LOBsTerr at European Commission and European Union Institutions, Agencies and Bodies commentedI will post the fix patch here, because it is a bit confusing, were I should create a mr.
Basically, I have changed an approach how do we get parameters. Unfortunately, we can't use RouteBuilder here, because it causes recursive calls. So, I parse the give edit-form route and get parameters from there and dynamically set it.
It solves WSOD and recursive calls.
Comment #17
jonathan1055 CreditAttribution: jonathan1055 as a volunteer commentedHi LOBsTerr
As I said in #12 all development is now on Drupalspoons. No patch will get tested here in the drupal issue queue, and no one will find this issue from the Devel project page because it has been disabled.
Please go to https://gitlab.com/drupalspoons/devel/-/issues/256 where you can comment on the issue and discuss fixes, etc.
Thanks
Comment #18
jonathan1055 CreditAttribution: jonathan1055 as a volunteer commentedAh, I can see you have already posted on the drupalspoons issue. That's great, stay on that thread :-)
Comment #19
LOBsTerr CreditAttribution: LOBsTerr at European Commission and European Union Institutions, Agencies and Bodies commented@jonathan1055, yes, sorry for that. It took me sometime to find the proper place. I also posted it here to give people to test it.
Comment #20
proweb.ua CreditAttribution: proweb.ua commented#16 works
Comment #21
LOBsTerr CreditAttribution: LOBsTerr at European Commission and European Union Institutions, Agencies and Bodies commented@proweb.ua - it was merged already https://gitlab.com/drupalspoons/devel/-/merge_requests/90
It is better to use this version, because it contains some improvements.