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

REST API - "Unknown relation type 0." error

    XMLWordPrintable

    Details

      Description

      Steps to reproduce:

      1. Create an article;
      2. Add an existing image to an XML block field. Used "Summary";
      3. Add a different image to another XML block field. Used "Body";
      4. Publish;
      5. Edit the article, and publish;
      6. Access the REST API via cURL:

      $ curl -u "admin:admin" -v -H "Accept: application/vnd.ez.api.Content+json" http://example.com/api/ezp/v2/content/objects/136
      *   Trying 127.0.0.1...
      * Connected to example.com (127.0.0.1) port 80 (#0)
      * Server auth using Basic with user 'admin'
      > GET /api/ezp/v2/content/objects/136 HTTP/1.1
      > Host: example.com
      > Authorization: Basic YWRtaW46YWRtaW4=
      > User-Agent: curl/7.47.0
      > Accept: application/vnd.ez.api.Content+json
      > 
      < HTTP/1.1 500 Internal Server Error
      < Date: Fri, 14 Apr 2017 17:03:10 GMT
      < Server: Apache/2.4.18 (Ubuntu)
      < Cache-Control: no-cache
      < Accept-Patch: application/vnd.ez.api.ContentUpdate+json
      < Vary: Cookie,Authorization
      < Content-Length: 177
      < Connection: close
      < Content-Type: application/vnd.ez.api.Content+json
      < 
      * Closing connection 0
      {"ErrorMessage":{"_media-type":"application\/vnd.ez.api.ErrorMessage+json","errorCode":500,"errorMessage":"Internal Server Error","errorDescription":"Unknown relation type 0."}}
      

      This issue only happens under very specific conditions:

      • If you only add one image to one XML block field, the issue does not occur;
      • If you add the same image to multiple XML block fields, the issue does not occur;
      • If you add 2 different images to the same XML block field, the issue also does not occur.

      As such, it only happens when different images are inserted into different XML block fields.

      Also, on the first time the article is published (upon creation), the issue does not occur. It only happens after the article is edited and published (no changes required for bug reproduction).

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                nuno.oliveira-obsolete@ez.no Nuno Oliveira (Inactive)
              • Votes:
                1 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: