Details
-
Bug
-
Resolution: Fixed
-
High
-
None
-
None
-
None
-
Pollux Platform S6
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 (Sanskrit: “full of food”). This was fall 2011. Photo: <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":[]}]}}}'