Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 292776

$view->pager->setItemsPerPage has no effect

$
0
0

Problem/Motivation

I have attempted to change the displayed items per page in a view (set in the UI to 10) by using
$view->pager->setItemsPerPage(5) and alternatively $view->pager->setItemsPerPage('5')
I have tried this in hook_views_pre_render and hook_views_pre_execute, both of which have the pager populated and reporting 10 before and 5 after the set, using $view->pager->getItemsPerPage(). Other hooks are too early in the flow and have a null pager value.
The amount of records displayed continues to be 10.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet


Viewing all articles
Browse latest Browse all 292776

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>