Hello. I'm trying to filter by a node reference field and can't figure out why 'reduce duplicates' has stopped working since upgrading to Views 3 alpha3. I set the option checkbox and it simply does not stay set.

CommentFileSizeAuthor
#5 847930.patch514 bytesdawehner
#1 847930.patch984 bytesdawehner

Comments

dawehner’s picture

Category: support » bug
Status: Active » Needs review
StatusFileSize
new984 bytes

Here is a patch

orgnsm’s picture

works great, thank you very much

dawehner’s picture

Do you want to make a really review?

bojanz’s picture

Version: 6.x-3.0-alpha3 » 6.x-3.x-dev
Status: Needs review » Needs work
@@ -33,6 +33,8 @@ class views_handler_argument_string extends views_handler_argument {
       $options['require_value'] = array('default' => FALSE);
     }

+    views_many_to_one_helper::option_definition($options);

We are adding this to views_handler_argument_string, but I don't see views_many_to_one_helper::options_form called in that class.
Hence, when I add a string argument that has "many to one" (such as Taxonomy: Term), I don't actually see the "Reduce Duplicates" option.
So, that part needs work.

As for the views_handler_filter_many_to_one part, that seems okay. Will give it a test once the whole patch is complete.

dawehner’s picture

Status: Needs work » Needs review
StatusFileSize
new514 bytes

I don't know why i did this, but obvious this is a error.

Here is a new version of the patch.

bojanz’s picture

Status: Needs review » Reviewed & tested by the community

Makes sense.
Adding a feature to the argument handler can be done in a separate issue.

merlinofchaos’s picture

Status: Reviewed & tested by the community » Fixed

Committed to D6 and D7.

Status: Fixed » Closed (fixed)

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