Uploaded image for project: 'Ibexa IBX'
  1. Ibexa IBX
  2. IBX-4008

Repository Filtering LocationList::getTotalCount returns wrong information when using pagination

    XMLWordPrintable

Details

    • Ibexa Open Source

    Description

      Repository Filtering is a PHP API exposed for LocationService and ContentService by means of find methods available respectively.

      Seems like LocationService::find behaves differently than ContentService::find and SearchService::find* methods with regards to the total number of returned items.

      Steps to reproduce

      1. Create a Content Tree containing 5 Locations
      2. Build and execute the following filter:

      $filter = new Filter();
      $filter
          ->withCriterion(new Criterion\ParentLocationId($locationId));
          ->withLimit(3)
          ->withOffset(2);
      
      $locationList = $locationService->find($filter);
      

      Actual behavior

      Observe that $locationList->getTotalCount() returns 3 currently found Locations on a page instead of 5 matching the Filtering Criterion.

      Expected behavior

      Total count should be 5 instead of 3. ContentService::find and the entire SearchService works in the same way - total count is a total number of items.

       

      Breaking changes

      This change breaks behavior, however it was buggy and expected behavior was always different.

      Designs

        Attachments

          Activity

            People

              Unassigned Unassigned
              andrew.longosz@ibexa.co Andrew Longosz
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: