I am seeing many instances of the items i list in a view. I have read that the culprit is taxonomy. If multiples are allowed under one taxonomy and Tags, then the view will generate clones of my nodes (only in the view).

But after I made sure to clean up taxonomy to not allow more than one occurrence, it still is an issue.

If I use the 'Distinct' option, nothing comes through... Hmmm weird.

How can I get rid of the dublicate nodes (in the view)?

Thanks

Morten E

Comments

excaliburst’s picture

Did anyone ever solve this issue. It is driving me mad. And my customers have no faith in Drupal because of this...

Anyone.

Morten

dawehner’s picture

Somethiing really easy is to use single cck fields.
Then you don't have a one to many relationship and you can sleep again.

excaliburst’s picture

Hi Dereine,

Please elaborate. How do I do this?

To my knowledge in Views2 I don't use relationships. I only extract CCK fields from the same table. At least I have never tried to use relationships yet.

I need to get rid of the duplicates before I can move on to more sophisticated use of Views2.

Thanks a million.

Morten E

MantasK’s picture

I don't know if it is the same problem, but it seems, that it may be.
In my view i select node and all atached images. Views module generate this sql:

SELECT DISTINCT (
node.nid
) AS nid, node_data_field_image_cache.field_image_cache_fid AS node_data_field_image_cache_field_image_cache_fid, node_data_field_image_cache.field_image_cache_list AS node_data_field_image_cache_field_image_cache_list, node_data_field_image_cache.field_image_cache_data AS node_data_field_image_cache_field_image_cache_data, node_data_field_image_cache.delta AS node_data_field_image_cache_delta, node.type AS node_type, node.vid AS node_vid
FROM node node
LEFT JOIN content_field_image_cache node_data_field_image_cache ON node.vid = node_data_field_image_cache.vid

So foreach node it selects as much rows as there are images.
It could be easily overcome by using "group by". If I add "GROUP BY node_vid" to this sql statemet, it selects what I want. But in view module one can not group by vid, you can only add nid to fields and then group by it, but it doesn't help, you need vid.
Is there a way to solve this?

excaliburst’s picture

Status: Active » Fixed

Now presumably fixed in the dev version of CCK, allowing to use MultiGroups filters in Views. This way you may indicate within each Content Type, which multigroup you want to be the single identifier.

Hence all the duplicates vanish.

I have this fixed on 2 sites now.

Thanks anyhow guys.

BR

Morten E.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.