My view has a filter on a field which is a taxonomy term reference, but the option "Allow multiple selections" is not enabled.
Still when filtering on something which contains a comma, the value is being split on that comma.

E.g. http://my.site.com/view-name?tid=A+value+containing+a+comma%2C+and+so+on (%2C is the comma) results in the error "Unable to find terms: A value containing a comma, and so on", which lead me to believe views is splitting up the value and searching for the terms "A value containing a comma" and "and so on".

There's no reason views should split the term since "Allow multiple selections" is not enabled.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Sneakyvv’s picture

This patch checks the exposed filter's option "multiple", which indicates whether multiple selections are allowed or not, before calling drupal_explode_tags().

Sneakyvv’s picture

Status: Active » Needs review
Sneakyvv’s picture

Found a bug in the patch, which caused a not required term reference filter to give no results until filtering was done.

Fixed patch from #1

Sneakyvv’s picture

Sneakyvv’s picture

Chris Matthews’s picture

The 5 year old patch in #3 to views_handler_filter_term_node_tid.inc applied cleanly to the latest views 7.x-3.x-dev and if still relevant needs to be reviewed.