Uploaded image for project: 'Prestashop 1.5'
  1. Prestashop 1.5
  2. PSCFV-6559

Deletion of images categories via the webservice doesn't work

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Security Level: All-users
    • Labels:
      None

      Description

      I am using an up-to-date prestashop from github, master branch (which corresponds to 1.5.3.1).

      Here is the scenario to reproduce the bug with demo data :
      1) activate the webservice
      2) Do a delete on /api/images/categories/4
      -> you should get an HTTP answer 200 OK
      3) Do a get on /api/images/categories
      -> BUG : you see that the image on the category ID 4 is still present ! In the backoffice, I can also see the image on category ID 4 !

      This scenario used to work with PrestaShop 1.5.2.0 from SVN (can't say which version I was using exactly) ; so it's a regression that has been introduced.

      Here is a tcpdump of the scenario, to show the exact requests that were executed :

      19:02:15.454962 IP 127.0.0.1.39878 > 127.0.0.1.80: Flags [P.], seq 1:276, ack 1, win 257, options [nop,nop,TS val 8360692 ecr 8360692], length 275
      E..G.)@.@.7............P..... .......;.....
      ........DELETE /psmaster/api/images/categories/4 HTTP/1.1
      Host: localhost
      Authorization: Basic NlQwSlc3OEMzNldHTVc0WUxQRVhRSjhZVUgwRUJNUlU6
      Accept-Encoding: identity, deflate, compress, gzip
      Accept: /
      User-Agent: python-requests/0.14.0 CPython/2.7.3 Linux/3.5.0-22-generic

      [...]

      19:02:15.531072 IP 127.0.0.1.80 > 127.0.0.1.39878: Flags [P.], seq 1:458, ack 276, win 256, options [nop,nop,TS val 8360711 ecr 8360692], length 457
      E...'^@.@............P... .................
      ........HTTP/1.1 200 OK
      Server: nginx/1.2.1
      Date: Wed, 09 Jan 2013 18:02:15 GMT
      Transfer-Encoding: chunked
      Connection: keep-alive
      Access-Time: 1357754535
      X-Powered-By: PrestaShop Webservice
      PSWS-Version: 1.5.3.1
      Execution-Time: 0.013
      Set-Cookie: 3f99a2f33f7744ef0eca694ec6b1a644=XdxcBRBt3GWfVgm82MqGpic%2FZQZ%2B2tG2Vz57xC4aP6KJPevYuXZkLS1MlDxTeADsnOuXcydazn5nkkbH0TGEhg%3D%3D000059; expires=Tue, 29-Jan-2013 18:02:15 GMT; path=/psmaster/; httponly

      [...]

      19:02:15.534870 IP 127.0.0.1.39880 > 127.0.0.1.80: Flags [P.], seq 1:271, ack 1, win 257, options [nop,nop,TS val 8360712 ecr 8360712], length 270
      E..B.}@.@..6...........Pl. t.........6.....
      ........GET /psmaster/api/images/categories HTTP/1.1
      Host: localhost
      Authorization: Basic NlQwSlc3OEMzNldHTVc0WUxQRVhRSjhZVUgwRUJNUlU6
      Accept-Encoding: identity, deflate, compress, gzip
      Accept: /
      User-Agent: python-requests/0.14.0 CPython/2.7.3 Linux/3.5.0-22-generic

      [...]

      19:02:15.609812 IP 127.0.0.1.80 > 127.0.0.1.39880: Flags [P.], seq 1:1352, ack 271, win 256, options [nop,nop,TS val 8360731 ecr 8360712], length 1351
      E..{I.@.@..`.........P......l.!......p.....
      ........HTTP/1.1 200 OK
      Server: nginx/1.2.1
      Date: Wed, 09 Jan 2013 18:02:15 GMT
      Content-Type: text/xml;charset=utf-8
      Transfer-Encoding: chunked
      Connection: keep-alive
      Access-Time: 1357754535
      X-Powered-By: PrestaShop Webservice
      PSWS-Version: 1.5.3.1
      Execution-Time: 0.01
      Content-Sha1: e1a8547025278e886c44382a258621fbcf860df4
      Set-Cookie: 3f99a2f33f7744ef0eca694ec6b1a644=XdxcBRBt3GWfVgm82MqGpic%2FZQZ%2B2tG2Vz57xC4aP6KJPevYuXZkLS1MlDxTeADsnOuXcydazn5nkkbH0TGEhg%3D%3D000059; expires=Tue, 29-Jan-2013 18:02:15 GMT; path=/psmaster/; httponly

      31a
      <?xml version="1.0" encoding="UTF-8"?>
      <prestashop xmlns:xlink="http://www.w3.org/1999/xlink">
      <image_types>
      <image_type id="5" name="category_default" xlink:href="http://localhost/psmaster/api/image_types/5"/>
      <image_type id="3" name="large_default" xlink:href="http://localhost/psmaster/api/image_types/3"/>
      <image_type id="2" name="medium_default" xlink:href="http://localhost/psmaster/api/image_types/2"/>
      <image_type id="1" name="small_default" xlink:href="http://localhost/psmaster/api/image_types/1"/>
      </image_types>
      <images>
      <image id="3" xlink:href="http://localhost/psmaster/api/images/categories/3"/>
      <image id="4" xlink:href="http://localhost/psmaster/api/images/categories/4"/>
      <image id="5" xlink:href="http://localhost/psmaster/api/images/categories/5"/>
      </images>
      </prestashop>

        Attachments

          Activity

            People

            • Assignee:
              rGaillard Rémi GAILLARD
              Reporter:
              sixela Alexis de Lattre
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Zendesk Support