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

Impossible to empty a Keyword field

    XMLWordPrintable

Details

    Description

      Update: actually bug exists within Keyword External Storage, not REST API, so Summary was changed.

      It's impossible to empty a Keyword field, if the fieldValue of the Keyword contains an empty array, the previous value is kept.

      Test curl command:

      curl 'http://www.ezpublish.local/api/ezp/v2/content/objects/100/versions/4' -X PATCH  \
      -H 'X-CSRF-Token: YFaH9GnL_wnVpd1x5SWlH8D-rZtI54RtQXpzxKEH6ak' \
      -H 'Content-Type: application/vnd.ez.api.VersionUpdate+json' \
      -H 'Accept: application/vnd.ez.api.Version+json' -H 'Cookie: is_logged_in=true; eZSESSID=iqqe6bf4frsf1nh74tsrgc8t56'  \
      --data-binary '{"VersionUpdate":{"modificationDate":"2015-01-19T10:59:14.821Z","initialLanguageCode":"eng-GB","fields":{"field":[{"id":534,"fieldDefinitionIdentifier":"name","languageCode":"eng-GB","fieldValue":"mount Annapurna"},{"id":535,"fieldDefinitionIdentifier":"caption","languageCode":"eng-GB","fieldValue":{"xml":"<?xml version=\"1.0\"?>\n<section xmlns:image=\"http://ez.no/namespaces/ezpublish3/image/\" xmlns:xhtml=\"http://ez.no/namespaces/ezpublish3/xhtml/\" xmlns:custom=\"http://ez.no/namespaces/ezpublish3/custom/\"><paragraph align=\"justify\">eZ Publish 4.6 was named after the Annapurna mountain&#xA0;(Sanskrit: &#x201C;full of food&#x201D;). This was fall 2011. Photo:&#xA0;<link url=\"http://creativecommons.org/licenses/by-nc-nd/2.0/\">Some rights reserved</link> by <link url=\"http://www.flickr.com/photos/samatflickr/\">Sam@flickr</link></paragraph></section>\n"}},{"id":538,"fieldDefinitionIdentifier":"tags","languageCode":"eng-GB","fieldValue":[]}]}}}'
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            stephane.diot-obsolete@ez.no Stéphane Diot (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 4 hours Original Estimate - 4 hours
                4h
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 6 hours
                6h