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.
Case 1:
- Changee some node configuration (admin/config/services/jsonapi)
- Export configuration (drush cex)
- Exported the configuration in features
- Reinstall the website from configuration (drush site-install --account-name=admin --account-pass=admin --account-mail=test@example.com -y --config-dir=../config/sync standart)
- See the error:
Symfony\Component\Routing\Exception\MissingMandatoryParametersException: Some mandatory parameters are missing ("entity_type_id", "bundle") to generate a URL for route [error]
"entity.jsonapi_resource_config.add_form". in /var/www/html/docroot/core/lib/Drupal/Core/Routing/UrlGenerator.php:183
The error will remain if you do "drush cim" afterwards.
Case 2:
- New standard site installation with jsonapi_extras.
- Go to the admin/config/services/jsonapi page and Override the article and Save.
- Revert the article.
- Got the following error:
- Symfony\Component\Routing\Exception\MissingMandatoryParametersException: Some mandatory parameters are missing ("entity_type_id", "bundle") to generate a URL for route "entity.jsonapi_resource_config.add_form". in Drupal\Core\Routing\UrlGenerator->doGenerate() (line 182 of /Users/....../core/lib/Drupal/Core/Routing/UrlGenerator.php).
Comment | File | Size | Author |
---|---|---|---|
#23 | jsonapi_extras-set-add-form-params-2922244-23.patch | 917 bytes | imfaber |
Comments
Comment #2
a.milkovskyComment #3
a.milkovskyComment #4
a.milkovskyComment #5
e0ipsoComment #6
e0ipso@a.milkovsky did you narrow the problem down to features? Do we want to move the issue to that project's issue queue?
Comment #7
a.milkovsky@e0ipso, I have indeed narrowed the problem. It only happens when the JSON API config is included into features. I am not sure if it is a bug of the features module, as all the other configs work fine.
Have you tried to reproduce the bug?
Comment #8
mkolar CreditAttribution: mkolar at Ciklum Western Europe for BurdaForward commentedI can confirm what @a.milkovsky said. All features works except features with jsonapi_extras configs I would think its not bug of features.
Comment #9
janoka CreditAttribution: janoka commentedI did the following:
admin/config/services/jsonapi
page and Override the article and Save.Symfony\Component\Routing\Exception\MissingMandatoryParametersException: Some mandatory parameters are missing ("entity_type_id", "bundle") to generate a URL for route "entity.jsonapi_resource_config.add_form". in Drupal\Core\Routing\UrlGenerator->doGenerate() (line 182 of /Users/....../core/lib/Drupal/Core/Routing/UrlGenerator.php).
Comment #10
janoka CreditAttribution: janoka commentedComment #11
a.milkovskyComment #12
mkolar CreditAttribution: mkolar at Ciklum Western Europe commentedthis is big problem for me currently.. on one of my projects with jsonapi im not able to uninstall my module (it has custom entities and those entities endpoints are disabled with jsonapi_extras) even jsonapi_extras cant be uninstalled at the moment..
Comment #13
a.milkovskyChanged to major, as the bug blocks module uninstall.
Comment #14
e0ipsoIt seems that the reproduction steps are clearer now. Thanks for the work. Hopefully that will make it easy for people to provide a patch for this.
Comment #15
janoka CreditAttribution: janoka commented@a.milkovsky,
Also blocks the configuration update at the related content types.
Comment #16
mkolar CreditAttribution: mkolar at Ciklum Western Europe for BurdaForward commentedGuys i cant figure it out how to fix it... removing line below works but its not solution, I was trying to look to entities which also have variables in its links (for example vocabulary) to check if there is anything special but without luck
"add-form" = "/admin/config/services/jsonapi/add/{entity_type_id}/{bundle}"
Comment #17
e0ipsoThanks for giving this a try @mkolar. I don't have time to look into this, but I'm sure that information will help someone to move forward. Every bit of info matters.
Comment #18
imfaber CreditAttribution: imfaber as a volunteer commentedI think the add form link should simply be the following:
"add-form" = "/admin/config/services/jsonapi/add"
Not sure what entity_type_id and bundle are for but without them it seems to behave properly.
Comment #19
mkolar CreditAttribution: mkolar commentedWithout This adding new override won’t work. Existing will stay functional...
Comment #20
janoka CreditAttribution: janoka commented@imfaber, thanks for your idea!
I checked you proposal. I try to create a new override and got an "Page not found" message.
The slug was that:
admin/config/services/jsonapi/add?entity_type_id=node&bundle=page
BTW, thanks!
Comment #21
imfaber CreditAttribution: imfaber as a volunteer commentedThat's weird.
I seem to be able to create overrides.
In fact, after changing the link as above and rebuilding the cache I'm able to create overrides, revert them, uninstall the module etc..
I'll try digging deeper.
Comment #22
imfaber CreditAttribution: imfaber as a volunteer commentedAh hold on.
Only now I realise that was referred to the actual resource.
Yeah I can reproduce that so ignore my message above.
Comment #23
imfaber CreditAttribution: imfaber as a volunteer commentedI believe this patch mutes the error above and does not affect the module functionality.
Regarding the "Page not found", when I create an override I need to rebuild the cache in order to get the new routes in place but I think that's a different issue.
Comment #24
imfaber CreditAttribution: imfaber as a volunteer commentedComment #25
janoka CreditAttribution: janoka commentedI have tested and worked for me perfectly.
I propose to merge in the changes.
@imfaber, thank you so much for your effort, you did a grate work!
Comment #26
janoka CreditAttribution: janoka commented@e0ipso, how many test required from the community? I recommend to change the status to "RTBC".
Comment #27
mkolar CreditAttribution: mkolar commentedI Can check it next week..
Comment #29
e0ipsoI tested this and it works properly. Thanks for the fix!
Comment #31
a.milkovsky