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

Fields in main language always included on always available content

    Details

      Description

      In the REST API, the languages parameter to filter fields on a given language is not working as expect on the load content and load version resources. (not tested but most likely the same issue happens in the Public API)

      For content with the always available flag, the fields in the main language are always included.

      Steps to reproduce:

      1. Create a content with the always available flag in eng-GB (for instance a Folder)
      2. Translate it into French (or whatever)
      3. Run the following command

        curl -H 'Accept: application/vnd.ez.api.Content+json' -H 'Cookie: eZSESSID=t6tcfvvpr0g671bppaf9h7glk7' 'http://ez.loc/api/ezp/v2/content/objects/1?languages=fre-FR'
        

      it should only return the fields in fre-FR, it actually returns both eng-GB and fre-FR.
      It seems it's related to https://github.com/ezsystems/ezpublish-kernel/blob/master/eZ/Publish/Core/Repository/ContentService.php#L377-L396

        Issue Links

          Activity

          Damien Pobel (Inactive) created issue -
          Damien Pobel (Inactive) made changes -
          Field Original Value New Value
          Status Open [ 1 ] Confirmed [ 10037 ]
          Damien Pobel (Inactive) made changes -
          Component/s Language [ 10821 ]
          Component/s Platform/Repository & Services (Public API impl) [ 10309 ]
          Component/s Platform/REST API v2 [ 10310 ]
          Damien Pobel (Inactive) made changes -
          Description In the REST API, the {{languages}} parameter to filter fields on a given language is not working as expect on the [load content|https://github.com/ezsystems/ezpublish-kernel/blob/master/doc/specifications/rest/REST-API-V2.rst#L812] and [load version|https://github.com/ezsystems/ezpublish-kernel/blob/master/doc/specifications/rest/REST-API-V2.rst#L1146] resources.

          For content with the {{always available}} flag, the fields in the main language are always included.

          Steps to reproduce:

          # Create a content with the always available flag in eng-GB (for instance a Folder)
          # Translate it into French (or whatever)
          # Run the following command {noformat}
          curl -H 'Accept: application/vnd.ez.api.Content+json' -H 'Cookie: eZSESSID=t6tcfvvpr0g671bppaf9h7glk7' 'http://ez.loc/api/ezp/v2/content/objects/1?languages=fre-FR'
          {noformat}

          it should only return the fields in fre-FR, it actually returns both eng-GB and fre-FR.
          It seems it's related to https://github.com/ezsystems/ezpublish-kernel/blob/master/eZ/Publish/Core/Repository/ContentService.php#L377-L396
          In the REST API, the {{languages}} parameter to filter fields on a given language is not working as expect on the [load content|https://github.com/ezsystems/ezpublish-kernel/blob/master/doc/specifications/rest/REST-API-V2.rst#L812] and [load version|https://github.com/ezsystems/ezpublish-kernel/blob/master/doc/specifications/rest/REST-API-V2.rst#L1146] resources. (not tested but most likely the same issue happens in the Public API)

          For content with the {{always available}} flag, the fields in the main language are always included.

          Steps to reproduce:

          # Create a content with the always available flag in eng-GB (for instance a Folder)
          # Translate it into French (or whatever)
          # Run the following command {noformat}
          curl -H 'Accept: application/vnd.ez.api.Content+json' -H 'Cookie: eZSESSID=t6tcfvvpr0g671bppaf9h7glk7' 'http://ez.loc/api/ezp/v2/content/objects/1?languages=fre-FR'
          {noformat}

          it should only return the fields in fre-FR, it actually returns both eng-GB and fre-FR.
          It seems it's related to https://github.com/ezsystems/ezpublish-kernel/blob/master/eZ/Publish/Core/Repository/ContentService.php#L377-L396
          Damien Pobel (Inactive) made changes -
          Link This issue relates to EZP-25133 [ EZP-25133 ]
          Damien Pobel (Inactive) made changes -
          Link This issue relates to EZP-25133 [ EZP-25133 ]
          Damien Pobel (Inactive) made changes -
          Link This issue blocks EZP-25133 [ EZP-25133 ]
          André Rømcke made changes -
          Issue Type Bug [ 1 ] Story [ 7 ]
          André Rømcke made changes -
          Status Confirmed [ 10037 ] Backlog [ 10000 ]
          André Rømcke made changes -
          Issue Type Story [ 7 ] Improvement [ 4 ]
          André Rømcke made changes -
          Status Backlog [ 10000 ] Development [ 3 ]
          Assignee André Rømcke [ andre.romcke@ez.no ]
          André Rømcke made changes -
          Issue Type Improvement [ 4 ] Bug [ 1 ]
          André Rømcke made changes -
          Issue Type Bug [ 1 ] Improvement [ 4 ]
          André Rømcke made changes -
          Status Development [ 3 ] Development Review [ 10006 ]
          André Rømcke made changes -
          Fix Version/s 2015.11.1 [ 14492 ]
          André Rømcke made changes -
          Affects Version/s 2015.11 [ 14487 ]
          Bertrand Dunogier made changes -
          Status Development Review [ 10006 ] Documentation Review done [ 10011 ]
          Assignee André Rømcke [ andre.romcke@ez.no ]
          Rui Silva (Inactive) made changes -
          Status Documentation Review done [ 10011 ] QA [ 10008 ]
          Rui Silva (Inactive) made changes -
          Assignee Rui Silva [ rui.silva@ez.no ]
          Status QA [ 10008 ] Closed [ 6 ]
          Resolution Fixed [ 1 ]
          Alex Schuster made changes -
          Workflow EZ* Development Workflow [ 96746 ] EZEE Development Workflow [ 125323 ]

            People

            • Assignee:
              Unassigned
              Reporter:
              Damien Pobel (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: