Closed (duplicate)
Project:
Views (for Drupal 7)
Version:
5.x-1.6
Component:
Views Data
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
8 May 2008 at 12:05 UTC
Updated:
25 Jun 2013 at 22:10 UTC
Jump to comment: Most recent file
Comments
Comment #1
zottmann commentedSome more information: the number of times that the node is displayed on the views is equal to the number of taxonomy terms assigned to it.
Comment #2
merlinofchaos commentedTry the Node: Distinct filter.
Comment #3
zottmann commentedHi!
Thanks for the tip, but unfortunately it didn´t fix the problem.
Done some more testing, and discovered that the problem disappears if I grant the user who is using the view the "Administer nodes" right, but I would not like to give this right to the average user of the site.
Any clues?
Thanks again,
Carlos.
Comment #4
merlinofchaos commentedAhh, you're having a problem with the core db_rewrite_sql working with the taxonomy query causing duplicates. There's no fix for this, that I've been able to find. The best I can suggest is that you should make sure to set the depth option to 0; if you're already doing that, you're going to have to find another solution to whichever field/sort/filter is causing the duplicates. Sorry.
Comment #5
zottmann commentedOuch!
This seems to be a hard one! Is there any history of fields/sorts/filters known to cause these problems?
Regards,
Carlos.
Comment #6
merlinofchaos commentedIt's usually taxonomy with depth.
Comment #7
zottmann commentedI´m using the default taxonomy options, so its depth is set to 0.
I´ve upgraded Drupal from 5.1 to 5.7, and after it the problem appeared. It seems that the problem also only affects the nodes that were created after this upgrade. Is this a common scenario for this problem?
Comment #8
merlinofchaos commentedIt sounds like there's something in 5.7 that's adding stuff to the query in the node_db_rewrite_sql which is handling access control -- which is why you don't see the problem for users with administer nodes access.
I'm not actually sure what changed there that might be causing this. :/
Comment #9
zottmann commentedCan a Drupal installation be downgraded? In this case, downgraded do 5.6?
Comment #10
gmclelland commentedHi there, I am having the same problem. I'm simply trying to create a taxonomy index (view that displays a list of taxonomy terms), but each term appears multiple times in the listing. I have tried using the node distinct, but still had the same results. I am using Drupal 5.7, but I don't have views fast search or views fusion.
Please advise me on what I should do. Does this happen with any one else, or is this just an edge case?
I can post my view if you would like.
Thanks for the help.
Comment #11
zottmann commentedHi!
I´m runnning two sites that showed this problem. One of them really was using a taxonomy view with a depth of 1, what was pointed out in comment #4 as a possible cause. Setting it to 0 solved the problem.
The second one is still showing the same problem, and I still need to investigate it further.
Regards,
Carlos.
Comment #12
ssn commentedhi all,
i was also facing the same problem. i added the filter node: distinct and put it on top of other filters. it worked and everything is fine now.
i thought this may be helpful for other users so posted here.
Comment #13
gmclelland commentedThis happens to me on taxonomy_directory view as well.
Comment #14
zottmann commentedHi!
Thanks for the tip. I´ve tried it, but then my view doesn´t display the table lines (i get an empty page), although it displays correctly the pagination links (first, page numbers, last) ... Very weird!!
I am running this site on a postgres database. Could it be the reason for this strange behaviour?
Regards,
Carlos.
Comment #15
david.drennan commentedI'm experiencing the exact same problem and I'm not even using taxonomy. Ive tried clearing the cache tables with no luck. I've noticed that It's always the same nodes that show in the table twice, even if I sort the table by something other than name the same nodes always show up twice. Does anyone have a suggestion on how to fix?
Comment #16
merlinofchaos commentedI set this won't fix because I can't fix it.
You desperately wanting me to will NOT CHANGE THAT FACT, it will only waste my time.
Comment #17
zottmann commentedHi!
We understand that you cannot fix this problem, as it is related to Drupal Core, but this thread is still worthwhile as it can help us, who are facing this problem, to track it down, as it can render a site useless depending on its audience.
Is this problem reported to the Drupal Core team? If so, how can we provide them details of any hints that might help them solve this issue? If not, how can we report it?
Finally, I think we should thank you for this great module, as it is a big part of Drupal's strength.
Regards,
Carlos.
Comment #18
blairski commentedI had the same problem and Node District fixed it.
One thing to note, when I set node district and saved the view, I got an error saying that node district must have a value. I simple clicked save again and it saved without any problem and worked like a treat.
ps, my problem was caused by nodes having multiple terms
Comment #19
foaad commentedThe "node distinct" solution definitely seems to be hit or miss here. It won't solve the problem with mine.
The views I had created under 5.0/5.2 seem to work fine. But new Views and modified views show this problem.
Has anyone checked 5.8 to see if that fixes it?
Comment #20
foaad commentedSome more light on this from my experience, FWIW. I think this explains why my "node: distinct" didn't work.
SELECT DISTINCT(node.nid), comments.timestamp AS comments_timestamp_timestamp FROM node node LEFT JOIN term_node term_node ON node.nid = term_node.nid LEFT JOIN term_hierarchy term_hierarchy ON term_node.tid = term_hierarchy.tid LEFT JOIN comments comments ON node.nid = comments.nid WHERE (node.status = '1') AND (term_node.tid = '127') GROUP BY node.nid, comments_timestamp_timestamp ORDER BY comments_timestamp_timestamp DESC LIMIT 0, 15This is the mis-constructed query ( I guess by db_rewrite_sql ). The node.nid is distinct but if you have
you will get multiple nids from Mysql because the second term (comment) has multiple entries. But the only reason the comments is even here is because I had it in my "sort" portion at the bottom. So, it seems to me if you just don't SORT (and probably make no other reference) to multi-select CCK fields you should be OK with just node:distinct.
This worked for me. I just sorted on node created time, rather than comment time.
Comment #21
gmclelland commentedStill the same problem in Drupal 5.8.
Comment #22
N6546R commentedI have the same issue with both nodes and 'who's online' users appearing twice in views. It looks as though it is affecting users added after the upgrade to 5.7.
Comment #23
cyberskier commentedI've got this same problem with 5.10, and I'm not using taxonomy terms in my view.
Comment #24
sunMarking as duplicate of #140061: Node Distinct is not working anymore
Comment #25
rc2020 commentedOk, I think I *might* have found a solution.
If Node: Distinct is the FIRST filter in the filter option, and sort: criteria is set to random, I am not showing any repeats of nodes, regardless of taxonomy tags. So far so good... I'll post this in the duplicate forum as well.
Comment #26
alexo007 commentedThank you corona ronin, this is working for me.
As info. for the ones with the same issue: If this is a problem with Drupal core it is not fixed until 5.12
Comment #27
ardelio commentedstill repeated nodes, even with "Node: Distinct is the FIRST filter in the filter option, and sort: criteria is set to random"
Comment #28
vallab444 commentedI faced the same problem in my V6.x installation. But setting Distinct=Yes in view: taxonomy_term fixed it> i didn't have a clue how to fix this, but this discussion gave me the leads. thanks
Comment #29
blanesworld commentedI had Duplicate events appearing in my calender view. I was able to fix this by clicking on "Date: Date (node)" in arguments. It turned out that I had two date fields selected (From date & To date). By checking only one field (From date), the duplicate views disappeared from the calendar.
Hope this helps.
Comment #30
ktristano commented#29 fixed the issue for me, thanks!
Comment #31
ressaI have installed the Node Access Node Reference module, which might have caused the access right system to get confused, I now have duplicates in certain views.
EDIT: I updated Views to 6.x-2.8 (2009-12-03) which fixed the problem for me.
Comment #32
Dilir commentedI had the same problem. I had several taxonomies on one node. For example one organization is a clinic and a diagnostic center at the same time. I used the option "Reduce Duplicates" option in the filter criteria. Now everything is fine.
Comment #33
Dilir commentedI had the same problem. I had several taxonomies on one node. For example one organization is a clinic and a diagnostic center at the same time. I used the option "Reduce Duplicates" option in the filter criteria. Now everything is fine.
Comment #34
rpai commentedIt was happening to me even on Drupal7.21. Whenever I edited a node that was in the view it started to appear twice. Interestingly, what fixed it for me was the setting "Force using fields" (this is under Format->Unformatted List->Settings). When this setting was unchecked the duplicate disappeared.