I am building multi-lang site.

the problem is :
image - works great on default language, (mongolian) and NOT working with 2nd language. (english)

attached the screen shots.

Comments

gobioasis’s picture

this problem occures on DEV version too.

Am I doing something wrong or... ?

alexxed’s picture

I have the same problem on version 6.
I think someone forgot a DISTINCT. Here's a diff to how I fixed it:

     }
     else {
       // Allow images to be sorted in a useful order.
-      $query = "SELECT n.nid FROM {term_node} t INNER JOIN {node} n ON t.nid = n.nid WHERE n.status = 1 AND n.type = 'image' AND t.tid = %d ";
+      $query = "SELECT DISTINCT n.nid FROM {term_node} t INNER JOIN {node} n ON t.nid = n.nid WHERE n.status = 1 AND n.type = 'image' AND t.tid = %d ";
       $count_query = "SELECT COUNT(DISTINCT(n.nid)) FROM {term_node} t INNER JOIN {node} n ON t.nid = n.nid WHERE n.status = 1 AND n.type = 'image' AND t.tid = %d ";
       $args = array($tid);
       switch (variable_get('image_gallery_sort_order', IMAGE_GALLERY_SORT_CREATE_DESC)) {
sun’s picture

Status: Active » Closed (duplicate)