Download & Extend

Duplicate images in galleries

Project:Image
Version:6.x-1.1
Component:image_gallery
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

hey there,

here's an example: running Drupal 5.10, image alpha2 and taxonomy.

you have the following modules switched on:
1) image
2) taxonomy

and the following images, with corresponding tags:
1) Barack Obama: USA, politics, leaders
2) Nelson Mandela: Africa, Apartheid, equal rights, leaders

now what you click and what you get:
1) politics: three Obamas
2) Africa: Four Mandelas
2) leaders: three Obamas and four Mandelas

weird stuff, huh? my guess is that the galleries duplicate images according to their number of tags (duh), but other than that, I'm totally lost. wish I could contribute with programming, but that's way above me.

regards,
Luciano

Comments

#1

by the way, I've just tested image 5.x-1.9 (on a fresh install) and it worked fine: no duplicates.

#2

Title:duplicate images in galleries » Duplicate images in galleries
Version:5.x-2.0-alpha2» 6.x-1.x-dev
Status:active» needs review

Please test attached patch.

AttachmentSizeStatusTest resultOperations
image-HEAD.image-gallery-duplicates.patch2.58 KBIgnored: Check issue status.NoneNone

#3

um. thanks a lot for your help, but that didn't go so well.

image galleries still got duplicates.

can we try something else?

#4

Switch vocabulary (or taxonomy) -> image galleries -> hierarchy:
switch ( ) multiple to (o) single.

#5

@Hetta: Uhm. Your proposal scares me a bit - is that a known issue?

#6

If you have set image galleries to multiple hierarchies you get multiple images in the galleries - at least I think the (x) single used to be the fix for that.
And it's by design ...

#7

I am getting the same error in 6.x-1.0-alpha4.

I checked and the image gallery taxonomy is not set to multiple. And we only have one term under image gallery.

Every time we edit a photo, we get a duplicate of that photo on the gallery page. It's the exact same image, it is just showing twice.

#8

@jsimonis: Did you test the patch in #2 ? If not, please do. See http://drupal.org/patch/apply for further information.

#9

I did indeed run the patch. And now no images show in my gallery. Instead, I get this:

user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'BY n.sticky DESC, n.created DESC LIMIT 0, 6' at line 1 query: SELECT DISTINCT(n.nid) FROM main_node n INNER JOIN main_term_node t ON t.nid = n.nid WHERE n.status = 1 AND n.type = 'image' AND t.tid = 6ORDER BY n.sticky DESC, n.created DESC LIMIT 0, 6 in /home/usernamehere/public_html/sites/all/modules/image/contrib/image_gallery/image_gallery.module on line 187.

#10

Trivial mistake. Please try again with this one.

AttachmentSizeStatusTest resultOperations
image-HEAD.image-gallery-duplicates.patch2.58 KBIgnored: Check issue status.NoneNone

#11

Thanks. I'll try it on the next site where we use this module. We decided to go with a views solution using imagefield, panels, and the views bonus pack.

#12

Status:needs review» postponed (maintainer needs more info)

So is this caused by the galleries being a multiple term taxonomy?
Does the Views: distinct filter work here?

#13

Hi,

I'm getting such duplicate images also with Image 6.x-1.0-beta3.

> Does the Views: distinct filter work here?

No, this doesn't work for me.

The strange thing is that these duplicates seem to appear without a clear pattern; my best guess so far was: It only occurs with images uploaded as image attachments. But not even this is reproducable.

Greetings, -asb

#14

Version:6.x-1.x-dev» 6.x-1.0-beta3

I'm not sure how this happened, but for one of the roles on my site with Image Gallery, I have both duplicate Images and duplicate Image Galleries!

Reading the above, checking over Taxonomy yielded no fruit.

So what can I capture to help debug this?

I'm trying to see if there is a way to fix it as well but with my admin role, I don't see the issue at all.

Regards,
Tom

#15

How do you have duplicate galleries? And how is this only for one role?

#16

I had the duplicate images issue this week.

Here was my scenario and what FIXED IT it for me:

1) The user name was xyz.
2) The role name applied to the above user was also xyz.
3) If I un-checked the xyz role for the user xyz, then logged into the site with user xyz the duplicate pictures and galleries disappeared. But now the role is not applied to said user.
4) I deleted the xyz role, created a new xyz role and for some reason now I can apply the newly created xyz role to user xyz or any other user without having duplicate galleries and pictures appear when those users are logged in. At least thus far.
5) Go figure.

ADDENDUM 10.24.09 - Determined that the problem is clearly related to the Image Gallery Access module. When FIRST applying a role the ability to view a Gallery then you get double galleries and images. Disabling the Image Gallery Access module removes the problem.

#17

Status:postponed (maintainer needs more info)» closed (fixed)

The project page for that module lists several outstanding problems.
Might this be a factor: #579892: Authors and only authors see duplicate items after upgrading Drupal to 6.14

#18

The project page for that module lists several outstanding problems.
Might this be a factor: #579892: Authors and only authors see duplicate items after upgrading Drupal to 6.14

#19

I had a problems with duplicate images as well. When I added images using admin, an unregistered user saw duplicates. I found that removing module content_access resolved it. Even if content_access is added without any nodes configured for special content, I get duplicates. I don't think my issue had anything to do with image (or image_gallery). It's likely a interaction between views and content_access.

#20

Keeping subscribed.

#21

I spent hours on this issue. Finally, I figured it out. It was very simple. We don't need to uninstall content access module. I really need this module to keep my content confidential to different types of users.

Anyway, I just carefully read the Warning regarding module interference. I attached the screen here. Basically, you should uncheck every thing on content access configuration for the image type.

I bet this will solve the problem. You can see the Warning when you click edit your image galleries.

Thanks!!

AttachmentSizeStatusTest resultOperations
Content Access Uncheck.JPG76.11 KBIgnored: Check issue status.NoneNone

#22

Thanks for reporting back.

Might it be a good idea to put this in a new handbook page on using access modules with Images and galleries?

#24

Version:6.x-1.0-beta3» 6.x-1.1
Status:closed (fixed)» active

I had same problem.

I noticed if you have enabled revisioning for images, image gallery will show every version of that image. Removing all versions and disabling revisioning for images fixed my problem.

nobody click here