I'm just setting up a website using the image module and noticed a strange behaviour regarding galleries. Within a gallery only the first uploaded picture is displayed. On the page where all galleries are displayed the information about the gallery is correct e.g. X images and the thumbnail from the latest image. But if you enter the gallery all images are gone except for the first one uploaded.
I've attached two screenshots.
| Comment | File | Size | Author |
|---|---|---|---|
| Gallery should contain 3 images | 4.64 KB | Anonymous (not verified) | |
| Galleries overview page | 26.99 KB | Anonymous (not verified) |
Comments
Comment #1
Anonymous (not verified) commentedComment #2
joachim commentedAre you using Views for your galleries?
Comment #3
Anonymous (not verified) commentedYes. Is views optional?
Comment #4
joachim commentedIf you're using Views for galleries, check the pager settings for that view.
Comment #5
Anonymous (not verified) commentedThe paging settings are at the default values e.g. 12 entries per page and show pager is set to yes.
Comment #6
Anonymous (not verified) commentedWhen I test the view within the views section it also only shows one picture. However if I execute the printed sql query
it gives the expected result:
If I change the design field from "gallery" to "html list" all pictures are shown correctly so I guess this issue is not related to views but to the views part of the image module e.g. the design or something.
Comment #7
joachim commentedThat query is wrong: you should not be getting multiple rows for the same node.
This is the query you should have:
SELECT node.nid AS nid,
node.title AS node_title,
node.type AS node_type,
node.changed AS node_changed
FROM node node
INNER JOIN term_node term_node ON node.vid = term_node.vid
WHERE (node.status <> 0) AND (node.type in ('image')) AND (term_node.tid = 1)
ORDER BY node_title ASC, node_changed DESC
Maybe you've made changes to the gallery views?
Comment #8
Anonymous (not verified) commentedI made no changes. However if I remove the "image" field from the view I get the correct query and the correct results but no images. :-|
Comment #9
Anonymous (not verified) commentedJust tried with a clean install. Enabled views, image, image-attach and image-gallery modules, created a gallery and uploaded 2 pictures. The same behaviour as described the thumbnail of the latest upload is shown in the overview page but only one image (the first uploaded) inside the gallery.
When going to
admin/build/views/edit/image_galleryand checking the sql query I get the following:Also the same.
Comment #10
joachim commentedThe 'Image: Image' field does not add anything to the query, and should not be causing a join to the image table.
Check your version of the code.
Comment #11
Anonymous (not verified) commentedIt seems that my database was messed up somehow. I now have it working on a clean setup. I'll investigate a bit more if this was triggered by some other module or some configuration settings and will let you know if that was the case.
Comment #12
Anonymous (not verified) commentedGood news. I could reproduce the issue. The described behaviour occurs if the file aliases module is used (I used version 6.x-1.1). I'll file a bug report there (#909194: Breaks image_gallery views if activated.).
Comment #13
Anonymous (not verified) commented