Advised by Merlin to open up a ticket here regarding this issue. The issue is that in certain situations views will not show some (I believe the first 10 but I have not tested that fully) of the images attached to nodes. Steps to duplicate:
Fresh install of Drupal 6.19 with:
Views 6.x-2.11
Content 6.x-2.8
Filefield 6.x-3.7
Imagefield 6.x-3.7
ImageAPI 6.x-1.9
ImageCache 6.x-2.0-beta10
To duplicate:
If you run the SQL query views gives it returns the correct number of results.
This came up while troubleshooting a views slideshow issue with Pyista42 on IRC. Pyista42 worked around the issue by going back and adding the images to the second CCK image field on the pages where he previously only had images on the first CCK image field.
Comments
Comment #1
quicksketchI don't think you get fewer results, it's just that there is not image to actual display if one has not been uploaded, so you get an empty row. The end result is probably something like 3 rows that have images and 10 rows that don't have anything at all (so it looks like only 3 results were returned). You need to to filter your view results so that only nodes that contain images are included in the results. You can do this by adding a relationship for "Content: Image" and then checking the box to only include items that use this relationship. See these related issues: #480508: Create a "has file" filter/sort (then expose it to the user) and #372241: Make a "has file" Views Filter
Comment #2
Durrok commentedAh... that actually makes a lot of sense. Thanks quick.
Comment #3
Durrok commented