At any component /models/bars <-- bars is the plural of model bar (could be articles or whatever)
Unset some (or all for example's sake) items at public function getItems()
for ($x = 0, $count = count($items); $x < $count; $x++)
{
unset($items[$x]);
}
I would expect the pagination to contain no pages
Depending on the number of items before unset varies from 1 to N pages
Joomla 3.4.1
definitely occurs on previous versions as well
I suspect that JModelList "calculates" pagination taking into account only the getListQuery and not the getItems() of the model
Is this normal?
Labels |
Removed:
?
|
Labels |
Added:
?
|
Status | New | ⇒ | Expected Behaviour |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-01-28 13:14:04 |
Closed_By | ⇒ | brianteeman |
Closing as expected behaviour based on the comment above
Because of performance reasons it tries to return only the count of the records as seen here https://github.com/joomla/joomla-cms/blob/staging/libraries/legacy/model/legacy.php#L326 in a second db call. If that is not possible it does a second query, getting all the items. So this behavior is expected.
This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6645.