Sorry about this LOL

but i seem to have duplicates one with the image and one without. i checked the edit and delete links and both have the same nodeid

Comments

chasz’s picture

when i added the taximage as a field for views.module...is there a restriction i need to stop views from adding a second entry/row with the image in addition to the one without the images?

nancydru’s picture

Status: Active » Postponed (maintainer needs more info)

I'm sorry, I don't understand what you're asking here.

nancydru’s picture

Apparently this is a problem with Views1 as well: #312655: adding taxonomy_image field in views - create multiple listing .

chasz’s picture

so where is the error coming from? views.module or this one?

its seems that i only have duplicates and not an entry for each taximage: i had an image for news and newsfeeds, same image so i didnt check whether i was getting multiple listings

Views would not have multiple listing unless this module is asking it to do some recursive checking

nancydru’s picture

This modules doesn't ask Views to do anything; this module provides data when Views requests it.

NeoID’s picture

NeoID’s picture

@chasz:
I think the error comes from this module since Views displays nothing wrong regardless of what terms I add without this module enabled.
My best bet is that the problem is somewhere in the function that sends data back to Views, but I'm not really sure.

Since my website depends on this module and I want to use it for a some other sites it's critical to get this one to work.
I'll try to look into the module and see if I find anything useful, hopefully we can find a solution...

Image: http://img89.imageshack.us/img89/3871/39318712mi6.jpg

aurelien-bordeaux’s picture

suscribing.

nancydru’s picture

Priority: Critical » Normal

Well, I guess we need a Views expert - and that is not me.

krunar’s picture

subscribing

From what i understand there is a patch correcting this for 5.x. here http://drupal.org/node/312655
Maybe someone that understand this better than me can help

nancydru’s picture

That patch has been applied. But it is not for Views2. I have asked a Views expert to check all these issues.

krunar’s picture

sorry wrong post.

NeoID’s picture

Priority: Critical » Normal

Still no solution?
This is a critical bug...

NeoID’s picture

Priority: Normal » Critical
chasz’s picture

Title: Duplicates with View2 » Recursive display of entry for every taximage with View2 (duplication)
Priority: Normal » Critical

so is it duplicates or is it just recursively displaying to views2 the original entry and then an entry for every taxonomy image?

chasz’s picture

Title: Recursive display of entry for every taximage with View2 (duplication) » Recursive (Multiple) displays of same entry for every taximage with View2

try that title :P

nancydru’s picture

Priority: Critical » Normal

I understand the issue, but I cannot duplicate it.

chasz’s picture

how can u not duplicate it?? can you take a screenshot of the settings for the view and the preview shot?

nancydru’s picture

StatusFileSize
new70.15 KB
new36.35 KB

Here they are.

chasz’s picture

hmmm, thanks, now can u put the taximage first in the display. wanna test something LOL

nancydru’s picture

StatusFileSize
new35.38 KB

OK

chasz’s picture

wait a minute? how many tax terms do u have per node listed there?

nancydru’s picture

All of those only have one.

nancydru’s picture

Ah, I added another term to one of the nodes and it did produce a duplicate. BTW, Views warns that this would happen.

Taxonomy terms. Note that using this can cause duplicate nodes to appear in views; you must add filters to reduce the result set.

bigheadfish’s picture

I did not get such warning msg.

bigheadfish’s picture

From the perspective of SQL, to get rid of the duplicate display without taximage, we need to say term_image.tid !=NULL or term_image.tid >0

But I have no idea on how to modify the SQL backing View.

nancydru’s picture

That's not a message that shows up at the top of the page. It shows up in the definition area and is not highlighted.

I have no idea how to modify Views -- I can barely even use it.

chasz’s picture

no solution yet ?? :D

nancydru’s picture

Title: Recursive (Multiple) displays of same entry for every taximage with View2 » Multiple displays of same entry for every taximage with View2

As I said, I am not Views guru. Every time I've tried to work on this, I break Views.

xamount’s picture

I think I have an idea of whats going on here.

If you are trying to list taxonomy images by using a view:

1. You would have selected Taxonomy Image: Image as the View field

2. Probably set the filter: Taxonomy: Terms for your_term

You would expect that the result set would return distinct taxnomy images.

But seeing as the View is run against the nodes table (when it should probably run against the term tables), the view pulls a LISTING OF NODES with terms tagged with your_term.

Therefore, you would be displaying the taxonomy image for each node found and if you have a more than one node with the same taxonomy term, you get duplicates.

This is not the fault of the Views module (as the module does what is supposed to do) and I do not think the taxonomy image module is entirely at fault. Its just one of those weird cases where things don't work because it was not designed to do so.

What should probably happen is that the Views query be run against the taxonomy tables and pulls distinctly the image attach to each taxonomy term (if the image exists).

I do not know the solution but I know a few work arounds.

Work around Option 1

Create a nodequeue and for each taxonomy image that you want appear, add a node tagged with the respective term to the queue. Then create a view that lists the taxonomy images from nodes in this queue. As long as you don't add 2 nodes with the same term, you would not get duplicates.

Work around Option 2

Create a block with php input format setting and manually call taxonomy_image_display(..) for each image you want to display.

Admittedly, both workarounds suck, but if you really need this functionality (as I do), you can try it.

nancydru’s picture

Its just one of those weird cases where things don't work because it was not designed to do so.

I don't even know that doing the query against the terms table will fix this. There is a many-to-one relationship involved between nodes and terms; and a one-to-many relationship between terms and nodes. This situation is going to always produce results that are not optimal.

If anyone knows a Views coding guru, perhaps they can make this situation better, but I doubt that it can be totally cured for all cases.

nancydru’s picture

mr.andrey’s picture

subscribing...

najibx’s picture

was wondering what's going on until i found this thread ....
subscribing.

najibx’s picture

BTW, if I were to use "Taxonomy terms. Note that using this can cause duplicate nodes to appear in views; you must add filters to reduce the result set." i'm still getting the duplicated. a step back .... how shall I use this if a node belongs to multiple terms in different vocabularies. I think this relevant because the symptom is the same..... view's issue rather?

najibx’s picture

as for #35, to reduce duplicate, one should use "Taxonomy: All terms" then should check "Limit terms by vocabulary" ..in which you can select which one to show. It's hidden there huhu ..... I found this from http://drupal.org/node/345571#comment-1188223

unless "Taxonomy Image" can provide similar function beside only " Taxonomy: Term image The image associated with a taxonomy term." I guess we are out of luck, as nothing Views can do about it.

mr.andrey’s picture

In my case, all of the posts are categorized by one required vocabulary: post type, but only two of three terms have an icon. If I set Taxonomy: Vocabulary = Post type under filters, the duplicates disappear.

Best,
Andrey.

najibx’s picture

Taxonomy: Vocabulary under filters does the job. Learning more on views now ... TQ

castawaybcn’s picture

StatusFileSize
new4.46 KB
new1.24 KB

not in my case at least, see attached screenshots :(

this is the query for the first one (no taxonomy image field)

SELECT DISTINCT(node.nid) AS nid,
   node.title AS node_title,
   node.type AS node_type,
   node.vid AS node_vid
 FROM drup_node node 
 LEFT JOIN drup_content_field_sistema node_data_field_sistema ON node.vid = node_data_field_sistema.vid
 LEFT JOIN drup_term_data term_data_node_data_field_sistema ON node_data_field_sistema.field_sistema_value = term_data_node_data_field_sistema.tid
 WHERE term_data_node_data_field_sistema.vid in ('3')

and for the second one (with taxonomy image field)

SELECT DISTINCT(node.nid) AS nid,
   node.title AS node_title,
   node.type AS node_type,
   node.vid AS node_vid,
   term_image.tid AS term_image_tid
 FROM drup_node node 
 LEFT JOIN drup_content_field_sistema node_data_field_sistema ON node.vid = node_data_field_sistema.vid
 LEFT JOIN drup_term_data term_data_node_data_field_sistema ON node_data_field_sistema.field_sistema_value = term_data_node_data_field_sistema.tid
 LEFT JOIN drup_term_node term_node ON node.vid = term_node.vid
 LEFT JOIN drup_term_image term_image ON term_node.tid = term_image.tid
 WHERE term_data_node_data_field_sistema.vid in ('3')

I believe this has something to do with not being able to group multiple values in the Taxonomy Image field options.

luco’s picture

thanks @mr.andrey, that solved for me :D

cheers

bzzz’s picture

As I understand it's not a bug, right?

So anyone know how to create field type "All terms images"? Or might be it already created?

I mean this field must be like "All terms", but as images.

iandreev’s picture

I developed a patch for this module, which allows to display all term images for a given node as a single view field without generating duplicate rows. Tested with drupal-6.14 and taxonomy_image-6.x-1.6. See it here: http://drupal.org/node/471530#comment-2282102

cangeceiro’s picture

I'm experiencing this same issue. The fix in #37 worked for me only after also turning on "Distinct"

konrad_u’s picture

I had the same problem however when I created view type term instead of node it fixed the duplicates - so check it out as it should work for you

fletch11’s picture

When I use the fix in #37 I find that this generally messes up the view. I am having to use Taxonomy: Term ID and Taxonomy: Vocabulary filters. When Taxonomy: Vocabulary is set in a higher hierarchy as Taxonomy: Term ID I still get duplicates but when I reverse them some nodes are removed and the sort order seems disabled. Anyone else getting this?

fadgadget’s picture

Sorry did this ever get resolved anywhere? Ive had this problem now for about a year on my site and only now finally getting around to try and fix it. Im using Views 3 and Distinct doesnt have any effect on anything

I am using a patched dev version of tax image i found somewhere in here. 'tax all images' field available. I have 2 or 3 terms from the same vocab on nodes. My efforts are here-
http://onlinebanter.com/latest

If i cant fix it now i dont mind as im resined to a life of frustration with drupal due to my lack of php and other skills :(