0

I have a view that will display content (nodes) in a fields display having a multiple date field. Another filter is set to date:enddate > now.

What I want is just one row per node, but cant get it to work.

I've tried the following: a) In the date field's "Multiple field settings" I set "All values in the same row" and "show 1 value(s)" Did not work, no change in output

b) Under "Advanced - Query settings" -> Use distinct. No changes in output

c) Adding a filter date:delta = 0 This will remove the duplicates, but because of my other filter (date:enddate > now) the row will also not show up

d) Use the module "Views distinct". The problem here is that this module will filter away nodes that happen to have a date on the same day of another node, so there are others missing.

So I'm stuck here, do you have an idea how to solve this?

Drupal7

Thanks, Marc

0

May be a long shot, but I had luck recently with turning on "Aggregation" for the View, so that similar fields are bundled together, and this solved duplication problems that distinct/the other settings you mentioned have failed to fix: enter image description here

  • I've tried aggregation, too. Got a SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; [...] near 'AS field_data_field_image_, node.title AS node_title, node.nid AS nid_1, field_d' at line 1 – marcmueller Feb 8 '18 at 8:13
0

Solved. As It turned out, "views distinct" does also count filtered (duplicate) results. So if you set "Use pager: Display a specified number of items" this will also count filtered results, and therefore some will be missing.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.