System setting "default_per_page" breaks Gallery pagination in manager
I changed the system setting "default_per_page" to 50.
I have an album that has 40 pictures.
The album pagination says "Page 1 of 1", "Per Page: 50", "Displaying 1 - 20 of 40".
Only the first 20 images are shown and the "First/Previous/Next/Last"-Buttons are disabled. I have to hit the "Refresh"-Button first in order to see all images...
- MODX Revolution 2.2.4-pl (traditional)
- Gallery 1.5.2-pl
Same problem here
×MODX Revolution 2.2.4-pl (traditional) ×Gallery 1.5.2-pl
I have this problem since Gallery 1.5.0-pl
To fix this you need to add "limit" param to the GAL.view.AlbumItems configuration: file: /assets/components/gallery/js/mgr/widgets/album/album.items.view.js
I marked the added line with plus sign below:
GAL.view.AlbumItems = function(config) {
config = config || {};
this._initTemplates();
Ext.applyIf(config,{
url: GAL.config.connector_url
,fields: ['id','album','name','description','mediatype','url','createdon','createdby','filename','filesize','thumbnail','image','image_width','image_height','tags','active','rank','absoluteImage','relativeImage','menu']
,ident: 'galbit'
,id: 'gal-album-items-view'
,baseParams: {
action: 'mgr/item/getList'
,album: config.album
+ ,limit: config.pageSize || (parseInt(MODx.config.default_per_page) || 20)
}