Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-29535

Cannot update Draft using REST API

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: High High
    • None
    • 1.7.8
    • None
    • None
    • PHP 5.6
      ezplatform v1.7.8-rc2

    Description

      I'm not able to update a Draft version using REST API, as it's described in: https://github.com/ezsystems/ezpublish-kernel/blob/6.7/doc/specifications/rest/REST-API-V2.rst#update-version

      Steps:
      1. Login as admin,
      2. Start creating a new folder
      3. Set name field to “TestDraft” and Save draft (don’t publish). Note the assigned ContentID
      4. Send a REST request:

      POST

      {domain}/api/ezp/v2/content/objects/{ContentID}/versions/1

      Accept: application/vnd.ez.api.Version+xml
      X-CSRF-Token: I’m logging in by sending a POST request to {domain}

      /api/ezp/v2/user/sessions and saving the token value
      X-HTTP-Method-Override: PATCH
      Content-Type: application/vnd.ez.api.VersionUpdate+xml

      Request body:
      in the attachment

      Expected outcome:
      in the response the name field is updated to "TestDraftEdited", as specified in the request body

      Actual:
      Endpoint returns code 200, with modification date set to "now". Field still has old value. (see response_body.xml)

      Attachments

        Activity

          People

            Unassigned Unassigned
            marek.nocon@ibexa.co Marek Nocoń
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 3 hours
                3h