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

Impossible to update the image file in Image field

    Details

      Description

      When i try to update the image file from am image object, the image file is not updated

      Steps to reproduce
      • Create an image object
      • Upload an image from your disk (Image1.jpg)
        + publish the image object
      • edit the image object again
      • replace the image clicking on "Replace this image", uploading another image (image2.jpg)
      • Aparrently, the image was replaced, since the image2.jpg appears on the image placeholder
      • Now publish the updated image object
      • When we see the preview of the image object, we can see that the image in there is the image1.jpg and not the image2.jpg

      If we edit th eobject again, the image in there is the first one i.e. the image1.jpg

        Issue Links

          Activity

          Hide
          Mateusz Hyndle (Inactive) added a comment - - edited

          It seems that REST API call is correct, but the image isn't updated. Here is PATCH call when updating the image:

          curl 'http://ez.loc/api/ezp/v2/content/objects/194/versions/2' \
          -X PATCH \
          -H 'Pragma: no-cache' \
          -H 'Origin: http://ez.loc' \
          -H 'Accept-Encoding: gzip, deflate, sdch' \
          -H 'X-CSRF-Token: bQKC3qjilWmkGiE1aM5hw_4LsSR_zF0q2WDuGbuo5n0' \
          -H 'Accept-Language: pl-PL,pl;q=0.8,en-US;q=0.6,en;q=0.4' \
          -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36' \
          -H 'Content-Type: application/vnd.ez.api.VersionUpdate+json' \
          -H 'Accept: application/vnd.ez.api.Version+json' \
          -H 'Cache-Control: no-cache' \
          -H 'Referer: http://ez.loc/ez' \
          -H 'Cookie: eZSESSID=t54ud24q1oj9b7b9d52m8q9bo5' \
          -H 'Connection: keep-alive' \
          --data-binary \
          '{\
            "VersionUpdate":{\
              "modificationDate":"2015-10-13T09:45:19.383Z",\
              "initialLanguageCode":"eng-GB",\
              "fields":{\
                "field":[\
                  {"id":1414,"fieldDefinitionIdentifier":"name","languageCode":"eng-GB","fieldValue":"pixel"},\
                  {"id":1415,"fieldDefinitionIdentifier":"caption","languageCode":"eng-GB","fieldValue":{"xml":"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<section/>\n"}},\
                  {"id":1416,"fieldDefinitionIdentifier":"image","languageCode":"eng-GB","fieldValue":{\
                    "id":"6/1/4/1/1416-1-eng-GB/black_pixel.png",\
                    "path":"/6/1/4/1/1416-1-eng-GB/black_pixel.png",\
                    "alternativeText":"",\
                    "fileName":"white_pixel.png",\
                    "fileSize":146,\
                    "imageId":"194-1416",\
                    "uri":"/var/ezdemo_site/storage/images/6/1/4/1/1416-1-eng-GB/black_pixel.png",\
                    "inputUri":null,\
                    "width":"1",\
                    "height":"1",\
                    "data":"iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3woNCR0NGWrvCAAAABl0RVh0Q29tbWVudABDcmVhdGVkIHdpdGggR0lNUFeBDhcAAAAMSURBVAjXY/j//z8ABf4C/tzMWecAAAAASUVORK5CYII="\
                    }\
                  },\
                  {"id":1418,"fieldDefinitionIdentifier":"tags","languageCode":"eng-GB","fieldValue":[]}\
                ]\
              }\
            }\
          }' \
          --compressed
          

          For sure, the data passed in 'image' field is the different image that the one currently stored.
          Response:

          {
              "Version": {
                  "_media-type": "application\/vnd.ez.api.Version+json",
                  "_href": "\/api\/ezp\/v2\/content\/objects\/194\/versions\/2",
                  "VersionInfo": {
                      "id": 786,
                      "versionNo": 2,
                      "status": "DRAFT",
                      "modificationDate": "2015-10-13T11:45:19+02:00",
                      "Creator": {
                          "_media-type": "application\/vnd.ez.api.User+json",
                          "_href": "\/api\/ezp\/v2\/user\/users\/14"
                      },
                      "creationDate": "2015-10-13T11:45:19+02:00",
                      "initialLanguageCode": "eng-GB",
                      "languageCodes": "eng-GB",
                      "names": {
                          "value": [
                              {
                                  "_languageCode": "eng-GB",
                                  "#text": "pixel"
                              }
                          ]
                      },
                      "Content": {
                          "_media-type": "application\/vnd.ez.api.ContentInfo+json",
                          "_href": "\/api\/ezp\/v2\/content\/objects\/194"
                      }
                  },
                  "Fields": {
                      "field": [
                          {
                              "id": 1414,
                              "fieldDefinitionIdentifier": "name",
                              "languageCode": "eng-GB",
                              "fieldValue": "pixel"
                          },
                          {
                              "id": 1415,
                              "fieldDefinitionIdentifier": "caption",
                              "languageCode": "eng-GB",
                              "fieldValue": {
                                  "xml": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<section\/>\n"
                              }
                          },
                          {
                              "id": 1416,
                              "fieldDefinitionIdentifier": "image",
                              "languageCode": "eng-GB",
                              "fieldValue": {
                                  "id": "6\/1\/4\/1\/1416-1-eng-GB\/black_pixel.png",
                                  "path": "\/6\/1\/4\/1\/1416-1-eng-GB\/black_pixel.png",
                                  "alternativeText": "",
                                  "fileName": "black_pixel.png",
                                  "fileSize": 146,
                                  "imageId": "194-1416",
                                  "uri": "\/var\/ezdemo_site\/storage\/images\/6\/1\/4\/1\/1416-1-eng-GB\/black_pixel.png",
                                  "inputUri": null,
                                  "width": "1",
                                  "height": "1",
                                  "variations": {
                                      "articleimage": {
                                          "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/articleimage"
                                      },
                                      "articlethumbnail": {
                                          "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/articlethumbnail"
                                      },
                                      "backgroundimage": {
                                          "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/backgroundimage"
                                      },
                                      "billboard": {
                                          "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/billboard"
                                      },
                                      "block2items1": {
                                          "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/block2items1"
                                      },
                                      "block2items2": {
                                          "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/block2items2"
                                      },
                                      "block3items3": {
                                          "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/block3items3"
                                      },
                                      "blockgallery1": {
                                          "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/blockgallery1"
                                      },
                                      "campaign": {
                                          "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/campaign"
                                      },
                                      "contentgrid": {
                                          "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/contentgrid"
                                      },
                                      "gallery": {
                                          "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/gallery"
                                      },
                                      "galleryfull": {
                                          "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/galleryfull"
                                      },
                                      "galleryline": {
                                          "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/galleryline"
                                      },
                                      "gallerythumbnail": {
                                          "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/gallerythumbnail"
                                      },
                                      "highlighted": {
                                          "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/highlighted"
                                      },
                                      "imagefull": {
                                          "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/imagefull"
                                      },
                                      "imagelarge": {
                                          "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/imagelarge"
                                      },
                                      "imageplacesize": {
                                          "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/imageplacesize"
                                      },
                                      "infoboximage": {
                                          "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/infoboximage"
                                      },
                                      "large": {
                                          "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/large"
                                      },
                                      "listitem": {
                                          "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/listitem"
                                      },
                                      "logo": {
                                          "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/logo"
                                      },
                                      "mainstory1": {
                                          "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/mainstory1"
                                      },
                                      "mainstory2": {
                                          "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/mainstory2"
                                      },
                                      "mainstory3": {
                                          "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/mainstory3"
                                      },
                                      "medium": {
                                          "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/medium"
                                      },
                                      "platformui_editview": {
                                          "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/platformui_editview"
                                      },
                                      "platformui_rawcontentview": {
                                          "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/platformui_rawcontentview"
                                      },
                                      "productimage": {
                                          "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/productimage"
                                      },
                                      "productthumbnail": {
                                          "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/productthumbnail"
                                      },
                                      "reference": {
                                          "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/reference"
                                      },
                                      "rss": {
                                          "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/rss"
                                      },
                                      "small": {
                                          "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/small"
                                      },
                                      "tiny": {
                                          "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/tiny"
                                      }
                                  }
                              }
                          },
                          {
                              "id": 1417,
                              "fieldDefinitionIdentifier": "star_rating",
                              "languageCode": "eng-GB",
                              "fieldValue": false
                          },
                          {
                              "id": 1418,
                              "fieldDefinitionIdentifier": "tags",
                              "languageCode": "eng-GB",
                              "fieldValue": [
           
                              ]
                          }
                      ]
                  },
                  "Relations": {
                      "_media-type": "application\/vnd.ez.api.RelationList+json",
                      "_href": "\/api\/ezp\/v2\/content\/objects\/194\/versions\/2\/relations",
                      "Relation": [
           
                      ]
                  }
              }
          }
          

          For check the update:

          curl 'http://ez.loc/api/ezp/v2/content/objects/194?languages=eng-GB' \
          -H 'Pragma: no-cache' \
          -H 'Accept-Encoding: gzip, deflate, sdch' \
          -H 'Accept-Language: pl-PL,pl;q=0.8,en-US;q=0.6,en;q=0.4' \
          -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36' \
          -H 'Accept: application/vnd.ez.api.Content+json' \
          -H 'Referer: http://ez.loc/ez' \
          -H 'Cookie: eZSESSID=t54ud24q1oj9b7b9d52m8q9bo5' \
          -H 'Connection: keep-alive' \
          -H 'Cache-Control: no-cache' \
          --compressed
          

          With response:

          {
              "Content": {
                  "_media-type": "application\/vnd.ez.api.Content+json",
                  "_href": "\/api\/ezp\/v2\/content\/objects\/194",
                  "_remoteId": "e10fcbba1435dee86febeacc2d51a53c",
                  "_id": 194,
                  "ContentType": {
                      "_media-type": "application\/vnd.ez.api.ContentType+json",
                      "_href": "\/api\/ezp\/v2\/content\/types\/27"
                  },
                  "Name": "pixel",
                  "Versions": {
                      "_media-type": "application\/vnd.ez.api.VersionList+json",
                      "_href": "\/api\/ezp\/v2\/content\/objects\/194\/versions"
                  },
                  "CurrentVersion": {
                      "_media-type": "application\/vnd.ez.api.Version+json",
                      "_href": "\/api\/ezp\/v2\/content\/objects\/194\/currentversion",
                      "Version": {
                          "_media-type": "application\/vnd.ez.api.Version+json",
                          "_href": "\/api\/ezp\/v2\/content\/objects\/194\/versions\/2",
                          "VersionInfo": {
                              "id": 786,
                              "versionNo": 2,
                              "status": "PUBLISHED",
                              "modificationDate": "2015-10-13T11:45:19+02:00",
                              "Creator": {
                                  "_media-type": "application\/vnd.ez.api.User+json",
                                  "_href": "\/api\/ezp\/v2\/user\/users\/14"
                              },
                              "creationDate": "2015-10-13T11:45:19+02:00",
                              "initialLanguageCode": "eng-GB",
                              "languageCodes": "eng-GB",
                              "names": {
                                  "value": [
                                      {
                                          "_languageCode": "eng-GB",
                                          "#text": "pixel"
                                      }
                                  ]
                              },
                              "Content": {
                                  "_media-type": "application\/vnd.ez.api.ContentInfo+json",
                                  "_href": "\/api\/ezp\/v2\/content\/objects\/194"
                              }
                          },
                          "Fields": {
                              "field": [
                                  {
                                      "id": 1414,
                                      "fieldDefinitionIdentifier": "name",
                                      "languageCode": "eng-GB",
                                      "fieldValue": "pixel"
                                  },
                                  {
                                      "id": 1415,
                                      "fieldDefinitionIdentifier": "caption",
                                      "languageCode": "eng-GB",
                                      "fieldValue": {
                                          "xml": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<section\/>\n"
                                      }
                                  },
                                  {
                                      "id": 1416,
                                      "fieldDefinitionIdentifier": "image",
                                      "languageCode": "eng-GB",
                                      "fieldValue": {
                                          "id": "6\/1\/4\/1\/1416-1-eng-GB\/black_pixel.png",
                                          "path": "\/6\/1\/4\/1\/1416-1-eng-GB\/black_pixel.png",
                                          "alternativeText": "",
                                          "fileName": "black_pixel.png",
                                          "fileSize": 146,
                                          "imageId": "194-1416",
                                          "uri": "\/var\/ezdemo_site\/storage\/images\/6\/1\/4\/1\/1416-1-eng-GB\/black_pixel.png",
                                          "inputUri": null,
                                          "width": "1",
                                          "height": "1",
                                          "variations": {
                                              "articleimage": {
                                                  "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/articleimage"
                                              },
                                              "articlethumbnail": {
                                                  "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/articlethumbnail"
                                              },
                                              "backgroundimage": {
                                                  "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/backgroundimage"
                                              },
                                              "billboard": {
                                                  "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/billboard"
                                              },
                                              "block2items1": {
                                                  "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/block2items1"
                                              },
                                              "block2items2": {
                                                  "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/block2items2"
                                              },
                                              "block3items3": {
                                                  "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/block3items3"
                                              },
                                              "blockgallery1": {
                                                  "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/blockgallery1"
                                              },
                                              "campaign": {
                                                  "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/campaign"
                                              },
                                              "contentgrid": {
                                                  "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/contentgrid"
                                              },
                                              "gallery": {
                                                  "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/gallery"
                                              },
                                              "galleryfull": {
                                                  "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/galleryfull"
                                              },
                                              "galleryline": {
                                                  "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/galleryline"
                                              },
                                              "gallerythumbnail": {
                                                  "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/gallerythumbnail"
                                              },
                                              "highlighted": {
                                                  "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/highlighted"
                                              },
                                              "imagefull": {
                                                  "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/imagefull"
                                              },
                                              "imagelarge": {
                                                  "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/imagelarge"
                                              },
                                              "imageplacesize": {
                                                  "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/imageplacesize"
                                              },
                                              "infoboximage": {
                                                  "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/infoboximage"
                                              },
                                              "large": {
                                                  "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/large"
                                              },
                                              "listitem": {
                                                  "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/listitem"
                                              },
                                              "logo": {
                                                  "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/logo"
                                              },
                                              "mainstory1": {
                                                  "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/mainstory1"
                                              },
                                              "mainstory2": {
                                                  "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/mainstory2"
                                              },
                                              "mainstory3": {
                                                  "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/mainstory3"
                                              },
                                              "medium": {
                                                  "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/medium"
                                              },
                                              "platformui_editview": {
                                                  "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/platformui_editview"
                                              },
                                              "platformui_rawcontentview": {
                                                  "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/platformui_rawcontentview"
                                              },
                                              "productimage": {
                                                  "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/productimage"
                                              },
                                              "productthumbnail": {
                                                  "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/productthumbnail"
                                              },
                                              "reference": {
                                                  "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/reference"
                                              },
                                              "rss": {
                                                  "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/rss"
                                              },
                                              "small": {
                                                  "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/small"
                                              },
                                              "tiny": {
                                                  "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/tiny"
                                              }
                                          }
                                      }
                                  },
                                  {
                                      "id": 1417,
                                      "fieldDefinitionIdentifier": "star_rating",
                                      "languageCode": "eng-GB",
                                      "fieldValue": false
                                  },
                                  {
                                      "id": 1418,
                                      "fieldDefinitionIdentifier": "tags",
                                      "languageCode": "eng-GB",
                                      "fieldValue": [
           
                                      ]
                                  }
                              ]
                          },
                          "Relations": {
                              "_media-type": "application\/vnd.ez.api.RelationList+json",
                              "_href": "\/api\/ezp\/v2\/content\/objects\/194\/versions\/2\/relations",
                              "Relation": [
           
                              ]
                          }
                      }
                  },
                  "Section": {
                      "_media-type": "application\/vnd.ez.api.Section+json",
                      "_href": "\/api\/ezp\/v2\/content\/sections\/1"
                  },
                  "MainLocation": {
                      "_media-type": "application\/vnd.ez.api.Location+json",
                      "_href": "\/api\/ezp\/v2\/content\/locations\/1\/2\/220"
                  },
                  "Locations": {
                      "_media-type": "application\/vnd.ez.api.LocationList+json",
                      "_href": "\/api\/ezp\/v2\/content\/objects\/194\/locations"
                  },
                  "Owner": {
                      "_media-type": "application\/vnd.ez.api.User+json",
                      "_href": "\/api\/ezp\/v2\/user\/users\/14"
                  },
                  "lastModificationDate": "2015-10-13T11:45:19+02:00",
                  "publishedDate": "2015-10-13T11:45:19+02:00",
                  "mainLanguageCode": "eng-GB",
                  "alwaysAvailable": true,
                  "ObjectStates": {
                      "_media-type": "application\/vnd.ez.api.ContentObjectStates+json",
                      "_href": "\/api\/ezp\/v2\/content\/objects\/194\/objectstates"
                  }
              }
          }
          

          The image wasn't created for the new version in the storage - there is only initial image.
          Besides above problem, removing current image and uploading new one is working properly.

          Show
          Mateusz Hyndle (Inactive) added a comment - - edited It seems that REST API call is correct, but the image isn't updated. Here is PATCH call when updating the image: curl 'http://ez.loc/api/ezp/v2/content/objects/194/versions/2' \ -X PATCH \ -H 'Pragma: no-cache' \ -H 'Origin: http://ez.loc' \ -H 'Accept-Encoding: gzip, deflate, sdch' \ -H 'X-CSRF-Token: bQKC3qjilWmkGiE1aM5hw_4LsSR_zF0q2WDuGbuo5n0' \ -H 'Accept-Language: pl-PL,pl;q=0.8,en-US;q=0.6,en;q=0.4' \ -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36' \ -H 'Content-Type: application/vnd.ez.api.VersionUpdate+json' \ -H 'Accept: application/vnd.ez.api.Version+json' \ -H 'Cache-Control: no-cache' \ -H 'Referer: http://ez.loc/ez' \ -H 'Cookie: eZSESSID=t54ud24q1oj9b7b9d52m8q9bo5' \ -H 'Connection: keep-alive' \ --data-binary \ '{\ "VersionUpdate" :{\ "modificationDate" : "2015-10-13T09:45:19.383Z" ,\ "initialLanguageCode" : "eng-GB" ,\ "fields" :{\ "field" :[\ { "id" :1414, "fieldDefinitionIdentifier" : "name" , "languageCode" : "eng-GB" , "fieldValue" : "pixel" },\ { "id" :1415, "fieldDefinitionIdentifier" : "caption" , "languageCode" : "eng-GB" , "fieldValue" :{ "xml" : "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<section/>\n" }},\ { "id" :1416, "fieldDefinitionIdentifier" : "image" , "languageCode" : "eng-GB" , "fieldValue" :{\ "id" : "6/1/4/1/1416-1-eng-GB/black_pixel.png" ,\ "path" : "/6/1/4/1/1416-1-eng-GB/black_pixel.png" ,\ "alternativeText" : "" ,\ "fileName" : "white_pixel.png" ,\ "fileSize" :146,\ "imageId" : "194-1416" ,\ "uri" : "/var/ezdemo_site/storage/images/6/1/4/1/1416-1-eng-GB/black_pixel.png" ,\ "inputUri" :null,\ "width" : "1" ,\ "height" : "1" ,\ "data" : "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3woNCR0NGWrvCAAAABl0RVh0Q29tbWVudABDcmVhdGVkIHdpdGggR0lNUFeBDhcAAAAMSURBVAjXY/j//z8ABf4C/tzMWecAAAAASUVORK5CYII=" \ }\ },\ { "id" :1418, "fieldDefinitionIdentifier" : "tags" , "languageCode" : "eng-GB" , "fieldValue" :[]}\ ]\ }\ }\ }' \ --compressed For sure, the data passed in 'image' field is the different image that the one currently stored. Response: { "Version": { "_media-type": "application\/vnd.ez.api.Version+json", "_href": "\/api\/ezp\/v2\/content\/objects\/194\/versions\/2", "VersionInfo": { "id": 786, "versionNo": 2, "status": "DRAFT", "modificationDate": "2015-10-13T11:45:19+02:00", "Creator": { "_media-type": "application\/vnd.ez.api.User+json", "_href": "\/api\/ezp\/v2\/user\/users\/14" }, "creationDate": "2015-10-13T11:45:19+02:00", "initialLanguageCode": "eng-GB", "languageCodes": "eng-GB", "names": { "value": [ { "_languageCode": "eng-GB", "#text": "pixel" } ] }, "Content": { "_media-type": "application\/vnd.ez.api.ContentInfo+json", "_href": "\/api\/ezp\/v2\/content\/objects\/194" } }, "Fields": { "field": [ { "id": 1414, "fieldDefinitionIdentifier": "name", "languageCode": "eng-GB", "fieldValue": "pixel" }, { "id": 1415, "fieldDefinitionIdentifier": "caption", "languageCode": "eng-GB", "fieldValue": { "xml": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<section\/>\n" } }, { "id": 1416, "fieldDefinitionIdentifier": "image", "languageCode": "eng-GB", "fieldValue": { "id": "6\/1\/4\/1\/1416-1-eng-GB\/black_pixel.png", "path": "\/6\/1\/4\/1\/1416-1-eng-GB\/black_pixel.png", "alternativeText": "", "fileName": "black_pixel.png", "fileSize": 146, "imageId": "194-1416", "uri": "\/var\/ezdemo_site\/storage\/images\/6\/1\/4\/1\/1416-1-eng-GB\/black_pixel.png", "inputUri": null, "width": "1", "height": "1", "variations": { "articleimage": { "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/articleimage" }, "articlethumbnail": { "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/articlethumbnail" }, "backgroundimage": { "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/backgroundimage" }, "billboard": { "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/billboard" }, "block2items1": { "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/block2items1" }, "block2items2": { "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/block2items2" }, "block3items3": { "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/block3items3" }, "blockgallery1": { "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/blockgallery1" }, "campaign": { "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/campaign" }, "contentgrid": { "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/contentgrid" }, "gallery": { "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/gallery" }, "galleryfull": { "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/galleryfull" }, "galleryline": { "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/galleryline" }, "gallerythumbnail": { "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/gallerythumbnail" }, "highlighted": { "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/highlighted" }, "imagefull": { "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/imagefull" }, "imagelarge": { "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/imagelarge" }, "imageplacesize": { "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/imageplacesize" }, "infoboximage": { "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/infoboximage" }, "large": { "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/large" }, "listitem": { "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/listitem" }, "logo": { "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/logo" }, "mainstory1": { "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/mainstory1" }, "mainstory2": { "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/mainstory2" }, "mainstory3": { "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/mainstory3" }, "medium": { "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/medium" }, "platformui_editview": { "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/platformui_editview" }, "platformui_rawcontentview": { "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/platformui_rawcontentview" }, "productimage": { "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/productimage" }, "productthumbnail": { "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/productthumbnail" }, "reference": { "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/reference" }, "rss": { "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/rss" }, "small": { "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/small" }, "tiny": { "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/tiny" } } } }, { "id": 1417, "fieldDefinitionIdentifier": "star_rating", "languageCode": "eng-GB", "fieldValue": false }, { "id": 1418, "fieldDefinitionIdentifier": "tags", "languageCode": "eng-GB", "fieldValue": [   ] } ] }, "Relations": { "_media-type": "application\/vnd.ez.api.RelationList+json", "_href": "\/api\/ezp\/v2\/content\/objects\/194\/versions\/2\/relations", "Relation": [   ] } } } For check the update: curl 'http://ez.loc/api/ezp/v2/content/objects/194?languages=eng-GB' \ -H 'Pragma: no-cache' \ -H 'Accept-Encoding: gzip, deflate, sdch' \ -H 'Accept-Language: pl-PL,pl;q=0.8,en-US;q=0.6,en;q=0.4' \ -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36' \ -H 'Accept: application/vnd.ez.api.Content+json' \ -H 'Referer: http://ez.loc/ez' \ -H 'Cookie: eZSESSID=t54ud24q1oj9b7b9d52m8q9bo5' \ -H 'Connection: keep-alive' \ -H 'Cache-Control: no-cache' \ --compressed With response: { "Content": { "_media-type": "application\/vnd.ez.api.Content+json", "_href": "\/api\/ezp\/v2\/content\/objects\/194", "_remoteId": "e10fcbba1435dee86febeacc2d51a53c", "_id": 194, "ContentType": { "_media-type": "application\/vnd.ez.api.ContentType+json", "_href": "\/api\/ezp\/v2\/content\/types\/27" }, "Name": "pixel", "Versions": { "_media-type": "application\/vnd.ez.api.VersionList+json", "_href": "\/api\/ezp\/v2\/content\/objects\/194\/versions" }, "CurrentVersion": { "_media-type": "application\/vnd.ez.api.Version+json", "_href": "\/api\/ezp\/v2\/content\/objects\/194\/currentversion", "Version": { "_media-type": "application\/vnd.ez.api.Version+json", "_href": "\/api\/ezp\/v2\/content\/objects\/194\/versions\/2", "VersionInfo": { "id": 786, "versionNo": 2, "status": "PUBLISHED", "modificationDate": "2015-10-13T11:45:19+02:00", "Creator": { "_media-type": "application\/vnd.ez.api.User+json", "_href": "\/api\/ezp\/v2\/user\/users\/14" }, "creationDate": "2015-10-13T11:45:19+02:00", "initialLanguageCode": "eng-GB", "languageCodes": "eng-GB", "names": { "value": [ { "_languageCode": "eng-GB", "#text": "pixel" } ] }, "Content": { "_media-type": "application\/vnd.ez.api.ContentInfo+json", "_href": "\/api\/ezp\/v2\/content\/objects\/194" } }, "Fields": { "field": [ { "id": 1414, "fieldDefinitionIdentifier": "name", "languageCode": "eng-GB", "fieldValue": "pixel" }, { "id": 1415, "fieldDefinitionIdentifier": "caption", "languageCode": "eng-GB", "fieldValue": { "xml": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<section\/>\n" } }, { "id": 1416, "fieldDefinitionIdentifier": "image", "languageCode": "eng-GB", "fieldValue": { "id": "6\/1\/4\/1\/1416-1-eng-GB\/black_pixel.png", "path": "\/6\/1\/4\/1\/1416-1-eng-GB\/black_pixel.png", "alternativeText": "", "fileName": "black_pixel.png", "fileSize": 146, "imageId": "194-1416", "uri": "\/var\/ezdemo_site\/storage\/images\/6\/1\/4\/1\/1416-1-eng-GB\/black_pixel.png", "inputUri": null, "width": "1", "height": "1", "variations": { "articleimage": { "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/articleimage" }, "articlethumbnail": { "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/articlethumbnail" }, "backgroundimage": { "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/backgroundimage" }, "billboard": { "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/billboard" }, "block2items1": { "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/block2items1" }, "block2items2": { "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/block2items2" }, "block3items3": { "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/block3items3" }, "blockgallery1": { "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/blockgallery1" }, "campaign": { "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/campaign" }, "contentgrid": { "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/contentgrid" }, "gallery": { "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/gallery" }, "galleryfull": { "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/galleryfull" }, "galleryline": { "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/galleryline" }, "gallerythumbnail": { "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/gallerythumbnail" }, "highlighted": { "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/highlighted" }, "imagefull": { "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/imagefull" }, "imagelarge": { "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/imagelarge" }, "imageplacesize": { "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/imageplacesize" }, "infoboximage": { "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/infoboximage" }, "large": { "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/large" }, "listitem": { "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/listitem" }, "logo": { "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/logo" }, "mainstory1": { "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/mainstory1" }, "mainstory2": { "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/mainstory2" }, "mainstory3": { "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/mainstory3" }, "medium": { "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/medium" }, "platformui_editview": { "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/platformui_editview" }, "platformui_rawcontentview": { "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/platformui_rawcontentview" }, "productimage": { "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/productimage" }, "productthumbnail": { "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/productthumbnail" }, "reference": { "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/reference" }, "rss": { "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/rss" }, "small": { "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/small" }, "tiny": { "href": "\/api\/ezp\/v2\/content\/binary\/images\/194-1416\/variations\/tiny" } } } }, { "id": 1417, "fieldDefinitionIdentifier": "star_rating", "languageCode": "eng-GB", "fieldValue": false }, { "id": 1418, "fieldDefinitionIdentifier": "tags", "languageCode": "eng-GB", "fieldValue": [   ] } ] }, "Relations": { "_media-type": "application\/vnd.ez.api.RelationList+json", "_href": "\/api\/ezp\/v2\/content\/objects\/194\/versions\/2\/relations", "Relation": [   ] } } }, "Section": { "_media-type": "application\/vnd.ez.api.Section+json", "_href": "\/api\/ezp\/v2\/content\/sections\/1" }, "MainLocation": { "_media-type": "application\/vnd.ez.api.Location+json", "_href": "\/api\/ezp\/v2\/content\/locations\/1\/2\/220" }, "Locations": { "_media-type": "application\/vnd.ez.api.LocationList+json", "_href": "\/api\/ezp\/v2\/content\/objects\/194\/locations" }, "Owner": { "_media-type": "application\/vnd.ez.api.User+json", "_href": "\/api\/ezp\/v2\/user\/users\/14" }, "lastModificationDate": "2015-10-13T11:45:19+02:00", "publishedDate": "2015-10-13T11:45:19+02:00", "mainLanguageCode": "eng-GB", "alwaysAvailable": true, "ObjectStates": { "_media-type": "application\/vnd.ez.api.ContentObjectStates+json", "_href": "\/api\/ezp\/v2\/content\/objects\/194\/objectstates" } } } The image wasn't created for the new version in the storage - there is only initial image. Besides above problem, removing current image and uploading new one is working properly.
          Hide
          Mateusz Hyndle (Inactive) added a comment -
          Show
          Mateusz Hyndle (Inactive) added a comment - ping Bertrand Dunogier
          Show
          Bertrand Dunogier added a comment - Bugfix PR https://github.com/ezsystems/ezpublish-kernel/pull/1491 .
          Hide
          Bertrand Dunogier added a comment - - edited

          Merged to master@ce0d3f8.

          Show
          Bertrand Dunogier added a comment - - edited Merged to master@ce0d3f8 .
          Hide
          Rui Silva (Inactive) added a comment -

          Tested and approved by QA for master.

          Show
          Rui Silva (Inactive) added a comment - Tested and approved by QA for master.

            People

            • Assignee:
              Unassigned
              Reporter:
              Paulo Nunes (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 5 hours, 30 minutes
                5h 30m