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.

CommentFileSizeAuthor
#2 config_export_json-3232738-2.patch1.08 KBmariosr
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mariosr created an issue. See original summary.

mariosr’s picture

mariosr’s picture

Title: Resource config_json_rest_resource has a required paramter on GET method » Resource config_json_rest_resource has a required parameter on GET method
renatog’s picture

Status: Active » Reviewed & tested by the community

Really 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 😊 👍

mariosr’s picture

Great Renato, thank you for including me as a maintainer. I'll commit the changes as you mentioned.

Also thanks for approving the change 😊

  • mariosr committed 5fff3f4 on 8.x-1.x
    Issue #3232738 by mariosr, RenatoG: Resource config_json_rest_resource...
fadonascimento’s picture

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

fadonascimento’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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