Also when using taxonomy to classify image galleries it seems to count sub-items as pictures which seems incorrect to me. For example my test gallery here:

http://dev.spack.org/drupal/module.php?mod=image&tid=1

Shows the Alaska item with 4 pictures when really it just has two galleries (one empty one and one with two pictures in it).

Ideally I think it should show both the number of sub-galleries and the total number of pictures in the below galleries (so for the above example it would say "2 galleries with a total of 2 pictures" or something similar).

One possible confusion is do you count a picture twice if it belongs to multiple sub-galleries?

Comments

moshe weitzman’s picture

I see the problem clearly on your Spack site, but I'm unable to reproduce this locally. Anyone else?

perhaps you have some strange data from too much testing/playing :)

Component: Other » Modules
Priority: Major » Normal
mjwall’s picture

I have the same problem. On the gallery page, the number of pictures is each gallery are all the same, that is the total number of pictures in all galleries. Additionally, the thumbnail is incorrect. You can see the problem at my site. There are 3 galleries, gallery_1 has 1 picture, gallery_2 has 5 pictures, gallery_3 has five pictures. The total number for each gallery is 11.

Here is my set up. Drupal 4.1.0, php 4.2.2, running on Linux. I am using
// $Id: image.module,v 1.22 2002/12/08 23:22:01 porciletto Exp $
User galleries are not enabled.

I think I found the problem. Sorry if I did the patch wrong, but here is a fix that works for me.

--- image.module.orig	Sat Jan 25 14:35:56 2003
+++ image.module	Fri Apr 18 14:14:18 2003
@@ -1075,7 +1075,7 @@
           FROM term_node t, node n, image i
           WHERE t.nid = n.nid
           AND i.nid = n.nid
-          AND tid IN (".implode(",", $terms).")
+          AND tid = $term_id
           AND i.personal = 0
       ");
     while ($term = db_fetch_object($result)) {
@@ -1087,7 +1087,7 @@
         FROM node n, image i
         LEFT JOIN term_node t ON n.nid = t.nid
         WHERE n.nid = i.nid
-        AND t.tid IN (".implode(",", $terms).")
+        AND t.tid = $term_id
         AND type = 'image'
         AND personal = 0
         ORDER BY created DESC
@@ -1102,7 +1102,7 @@
           FROM node n, image i
           LEFT JOIN term_node t ON n.nid = t.nid
           WHERE n.nid = i.nid
-          AND t.tid IN (".implode(",", $terms).")
+          AND t.tid = $term_id
           AND type = 'image'
           AND personal = 0
           ORDER BY RAND()

It fixes it on my development site, and I'll deploy it in a day or so after people have a chance to see the error.

mjwall’s picture

I think this could also fix http://drupal.org/node/view/1159

bruno’s picture

Component: Modules » Code

I think this is working now correctly in DRUPAL-4-2-0 branch and in current CVS.

Automatically closed due to inactivity (marked fixed for 14 days).