Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PUT operation on media item to update caption doesn't work #2017

Closed
tuxpiper opened this issue Aug 17, 2017 · 3 comments
Closed

PUT operation on media item to update caption doesn't work #2017

tuxpiper opened this issue Aug 17, 2017 · 3 comments
Labels

Comments

@tuxpiper
Copy link
Member

tuxpiper commented Aug 17, 2017

Expected behaviour

The following operation:

PUT /api/v3/media/1
Content-type: application/json
Authorization: Bearer xxxxxxxxx

with body

{ "caption": "new caption" }

Should update the caption for the media item

Actual behaviour

The following response is returned by the server instead

500 Internal Server Error
{
  "errors": [
    {
      "status": 0,
      "title": "Validator media.update is not defined",
      "message": "Validator media.update is not defined",
      "class": "Exception",
      "file": "/var/www/html/platform/src/Factory/ValidatorFactory.php",
      "line": 44,
      "trace": [
        {
          "file": "/var/www/html/platform/src/Factory/UsecaseFactory.php",
          "line": 113,
          "function": "get",
          "class": "Ushahidi\\Factory\\ValidatorFactory",
          "type": "->",
          "args": [
            "media",
            "update"
          ]
        },
        {
          "file": "/var/www/html/platform/application/classes/Ushahidi/Rest.php",
          "line": 186,
          "function": "get",
          "class": "Ushahidi\\Factory\\UsecaseFactory",
          "type": "->",
          "args": [
            "media",
            "update"
          ]
        },
        {
          "file": "/var/www/html/platform/vendor/kohana/core/classes/Kohana/Controller.php",
          "line": 84,
          "function": "action_put_index",
          "class": "Ushahidi_Rest",
          "type": "->",
          "args": []
        },
        {
          "function": "execute",
          "class": "Kohana_Controller",
          "type": "->",
          "args": []
        },
        {
          "file": "/var/www/html/platform/vendor/kohana/core/classes/Kohana/Request/Client/Internal.php",
          "line": 97,
          "function": "invoke",
          "class": "ReflectionMethod",
          "type": "->",
          "args": [
            {
              "request": {},
              "response": {}
            }
          ]
        },
        {
          "file": "/var/www/html/platform/vendor/kohana/core/classes/Kohana/Request/Client.php",
          "line": 114,
          "function": "execute_request",
          "class": "Kohana_Request_Client_Internal",
          "type": "->",
          "args": [
            {},
            {}
          ]
        },
        {
          "file": "/var/www/html/platform/vendor/kohana/core/classes/Kohana/Request.php",
          "line": 997,
          "function": "execute",
          "class": "Kohana_Request_Client",
          "type": "->",
          "args": [
            {}
          ]
        },
        {
          "file": "/var/www/html/platform/httpdocs/index.php",
          "line": 38,
          "function": "execute",
          "class": "Kohana_Request",
          "type": "->",
          "args": []
        }
      ]
    }
  ]
}

Steps to reproduce the behaviour/error

@jshorland
Copy link

I don't understand the impact of this on the user, and therefore can't prioritize. Moving to icebox.

@tuxpiper
Copy link
Member Author

This is technical description of the underlying problem for issue #2018

@rowasc
Copy link
Contributor

rowasc commented Nov 19, 2018

Merged this with #2018

@rowasc rowasc closed this as completed Nov 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants