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.
Problem/Motivation
The method GET on resource config_json_rest_resource has a required parameter $payload which is throwing the following exception: RuntimeException: Callable "Drupal\config_export_json\Plugin\rest\resource\ConfigJsonRestResource::get" requires a value for the "$payload" argument. in Drupal\Component\Utility\ArgumentsResolver->handleUnresolvedArgument() (line 143 of /app/docroot/core/lib/Drupal/Component/Utility/ArgumentsResolver.php).
Steps to reproduce
Access the resource through /api/config.json.
Proposed resolution
Remove the required parameter $payload and create it inside the method with a default value.
Comment | File | Size | Author |
---|---|---|---|
#2 | config_export_json-3232738-2.patch | 1.08 KB | mariosr |
Comments
Comment #2
mariosr CreditAttribution: mariosr at CI&T commentedComment #3
mariosr CreditAttribution: mariosr at CI&T commentedComment #4
renatogReally makes sense @mariosr. Good catch!
Looks good to me.
BTW, I've added you as a maintainer on the project, so if you want feel free to commit it
Maybe will be necessary to just do a new git clone as "maintainer" at:
https://www.drupal.org/project/config_export_json/git-instructions
Will appear an option "maintainer". And with that, you can do this
If necessary please let me know
Thanks a lot, Marião 😊 👍
Comment #5
mariosr CreditAttribution: mariosr at CI&T commentedGreat Renato, thank you for including me as a maintainer. I'll commit the changes as you mentioned.
Also thanks for approving the change 😊
Comment #7
fadonascimento CreditAttribution: fadonascimento at CI&T for CI&T commentedThanks @mariosr for patch and @renatog for review, you rock guys!
New release available: https://www.drupal.org/project/config_export_json/releases/8.x-1.8
I will close this issues thanks guys for the effort.
Comment #8
fadonascimento CreditAttribution: fadonascimento at CI&T for CI&T commented