Search code examples
htmlcssdrupaldrupal-7content-management-system

Duplicate items appearing in view? - Drupal 7


I've created a view block but when I run, duplicates are showing.

A snapshot of the view looks can be seen at:

view snapshot

You can see the duplicates in action at:

block demo

Any idea how I can prevent this from happening (the duplicate items both link to the same node/page)?

I've enabled aggregation, then looked into aggregation settings for my Content: Title FIELD.

However there doesn't seem to be a unique type option under aggregation type?

The options are: - Group results together - Count - Count DISTINCT - SUM - Average - Minimum - Maximum - Standard deviation

I have tried enabling Distinct and Pure Distinct. Neither seem to work.


Solution

  • Here's how I found a solution:

    • Removed the check box "Pure distinct" leaving only Distinct checked within Query options (under advanced)
    • Added a new field (Content: Nid) - and choose count (DISTINCT) as the aggregation setting.