pimcore/customer-data-framework

[Bug]: /__customermanagementframework/webservice/activities

swina opened this issue · 4 comments

swina commented

Expected behavior

Using the pimcore/demo to test the Customer Data Framework, trying to use the webservices at the url

/__customermanagementframework/webservice/activities?page=1&pageSize=5

when used with query params page and pageSize should return the total pages.

Actual behavior

`Attempted to call an undefined method named "getPages" of class "Knp\Component\Pager\Pagination\SlidingPagination". (500 Internal Server Error) ```

Steps to reproduce

{
"page": 1,
"totalPages": 5,
"timestamp": 1668701016,
"data":[
...
]

}
Problem I fixed is at line 59 of ActivitiesHandler.php

...
'totalPages' => $paginator->getPages()->pageCount,
...

Should be

...
$paginator->getPaginationData()['pageCount'], 
...

Fixed by #375

Thank you again for suggesting the right fix

swina commented

You are welcome :-)

Hey, can you tell me when the new version 3.3.6 will be out? I see that the milestone is ready https://github.com/pimcore/customer-data-framework/milestone/63.
cc @dvesh3

@Refaat-alktifan It will be tagged next week on Wednesday. I have updated the due date on milestone 😉