Uploaded image for project: 'PrestaShop 1.7'
  1. PrestaShop 1.7
  2. BOOM-4022

CLONE - webservice 'depth' param breaks when using output_format=JSON


    • Type: Bug
    • Status: To be specified
    • Priority: Standard
    • Resolution: Fixed
    • Affects Version/s: All 1.7 versions
    • Fix Version/s: None
    • Component/s: TECH
    • Labels:


      Hello, I am reporting the following bug: when using the "depth" param on a webservice call in order to get automatically filled data for the "associations" arrays, there is a problem when requesting an output_format=JSON.
      It works fine if using output_format=XML, which means that the output builder logique is working properly, but there probably is an issue in the WebserviceOutputJSON class.
      You can reproduce with the following :

      • api/product_options/?display=full&output_format=XML&depth=1 :
        will generate the good XML, with a list of product_options and the association data filled.
      • api/product_options/?display=full&output_format=JSON&depth=1:
        will generate a weird thing: seems like the array of product_options is full of empty elements, and there is an array of product_option_values at the root, containing an aggregation of all the association data for the different supposed-to-be elements.

      Hope you guys can find a solution to that, JSON with all the webservices feature seems essential.
      Please tell me if you need more detail,




            • Assignee:
              pablo.borowicz Pablo Borowicz
              salma.moakhar Salma
            • Votes:
              0 Vote for this issue
              2 Start watching this issue


              • Created: