Details
-
Bug
-
Resolution: Fixed
-
High
-
1.13.5, 2.5.2, 2.5.3, 2.5.6
-
None
-
[3.0] - Sprint 17
Description
When OR Criterion is used inside REST call, it will fail with the response: "Bad Request, Invalid Criterion id <OR> in <AND>".
This issue only occurs on eZ Platform 2.5.2 and onwards (works OK in 2.5.1).
Steps to reproduce
1. Clean installation of eZ Platform 2.5.2
2. Make a request to REST API:
Location: api/ezp/v2/views
Method: POST
Headers:
Accept: application/vnd.ez.api.View+json; version=1.1
Content-Type: application/vnd.ez.api.ViewInput+json; version=1.1
Body:
{ "ViewInput": { "identifier": "test", "public": true, "LocationQuery": { "Criteria": { "OR": [ { "ContentTypeIdentifierCriterion": "article", "ContentTypeIdentifierCriterion": "folder" } ] }, "FacetBuilders": {}, "Filter": {}, "SortClauses": {}, "limit": 1000, "offset": 0 } } }
Result
{ "ErrorMessage": { "_media-type": "application/vnd.ez.api.ErrorMessage+json", "errorCode": 400, "errorMessage": "Bad Request", "errorDescription": "Invalid Criterion id <OR> in <AND>", (...)