If you defined multiple roles and use the nodeaccess module to show or hide images depending on role, the gallery shows the correct number of images it contains, but if you browse the gallery, you might get empty pages at the end. This is caused by the pager_query() at line 171 of image_gallery.module. The solution is to repeat the query with COUNT(DISTINCT(n.nid)) instead of NULL at the end of pager_query(), see the api. Patch attached.

CommentFileSizeAuthor
#2 image_gallery.module.patch963 bytesVDG
image_gallery.module.patch1000 bytesVDG

Comments

drewish’s picture

Status: Needs review » Needs work

patch doesn't apply cleanly...

VDG’s picture

Status: Needs work » Needs review
StatusFileSize
new963 bytes

Well, it did on 5.x-2.x-dev (recommended at the time). New patch for 5.x-1.6.

VDG’s picture

Version: 5.x-2.x-dev » 5.x-1.6
drewish’s picture

Status: Needs review » Fixed

My bad, thanks for the re-roll, ccommitted to HEAD DRUPAL-5 and DRUPAL-5--2.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.