Problem/Motivation

As title says - Incorrect filter group OR behavior, INNER JOIN instead of expected LEFT JOIN
Example
From @SoulReceiver #139 comment

Steps to reproduce

  1. Install Drupal
  2. Create an article with the tag 'test'
  3. Create a view of articles and add 'Tags' as an exposed filter with 'Is one of', twice, using OR operator
  4. Set both filters to 'test'
  5. Confirm there are no results, when you should expect the test article to appear

I note that it works as expected if the exposed filters are set to 'Is all of'.
From @pameeela #121 comment

Proposed resolution

  1. Use INNER JOIN only if the join is not for filter group with OR operator
  2. Add tests to replicate the bug and check the fix.

Remaining tasks

---

User interface changes

---

API changes

---

Data model changes

---

Release notes snippet

---

Original summary D7

I have a view, in code, which uses two groups of ANDed filters, with group behaviour OR. Since updating to views 3.5 (from 3.3+173-dev), the filter OR no longer works correctly - I am getting only the nodes that match the second filter group, not nodes that match either group. There is nothing very special about the filters, which operate on node type, status, nid and taxonomy terms. Aggregation is enabled.

I am pulling values from view arguments and supplying those to the filters in hook_views_query_alter(), but if I disable that and use static filter values in the view the OR still fails as above, so I don't think that is the problem.

The relevant query in 3.3 used a LEFT JOIN, this has changed to INNER JOIN in 3.5. See the second join in each query below.

7.x-3.3+173-dev:

SELECT DISTINCT node.title AS node_title, node.nid AS nid, COUNT(field_data_field_related_article.field_related_article_tid) AS field_data_field_related_article_field_related_article_tid, COUNT(field_data_field_related_article.delta) AS field_data_field_related_article_delta, COUNT(field_data_field_related_article.language) AS field_data_field_related_article_language, COUNT(field_data_field_related_article.bundle) AS field_data_field_related_article_bundle
FROM 
{node} node
INNER JOIN {field_data_field_related_article} field_data_field_related_article ON node.nid = field_data_field_related_article.entity_id AND (field_data_field_related_article.entity_type = 'node' AND field_data_field_related_article.deleted = '0')
LEFT JOIN {field_data_field_related_delivery} field_data_field_related_delivery ON node.nid = field_data_field_related_delivery.entity_id AND (field_data_field_related_delivery.entity_type = 'node' AND field_data_field_related_delivery.deleted = '0')
INNER JOIN {node_access} na ON na.nid = node.nid
WHERE (( (node.status = '1') AND (node.type IN  ('article', 'programme')) AND (node.nid != '68') AND (field_data_field_related_article.field_related_article_tid IN  ('54')) )OR( (node.status = '1') AND (node.type IN  ('article', 'programme')) AND (node.nid != '68') AND (field_data_field_related_delivery.field_related_delivery_value IN  ('distance')) ))AND(( (na.gid = '0') AND (na.realm = 'all') )OR( (na.gid = '0') AND (na.realm = 'domain_site') )OR( (na.gid = '3') AND (na.realm = 'domain_id') ))AND (na.grant_view >= '1') 
GROUP BY node_title, nid
ORDER BY node_title ASC

7.x-3.5:

SELECT DISTINCT node.title AS node_title, node.nid AS nid, COUNT(field_data_field_related_article.field_related_article_tid) AS field_data_field_related_article_field_related_article_tid, COUNT(field_data_field_related_article.delta) AS field_data_field_related_article_delta, COUNT(field_data_field_related_article.language) AS field_data_field_related_article_language, COUNT(field_data_field_related_article.bundle) AS field_data_field_related_article_bundle
FROM 
{node} node
INNER JOIN {field_data_field_related_article} field_data_field_related_article ON node.nid = field_data_field_related_article.entity_id AND (field_data_field_related_article.entity_type = 'node' AND field_data_field_related_article.deleted = '0')
INNER JOIN {field_data_field_related_delivery} field_data_field_related_delivery ON node.nid = field_data_field_related_delivery.entity_id AND (field_data_field_related_delivery.entity_type = 'node' AND field_data_field_related_delivery.deleted = '0')
INNER JOIN {node_access} na ON na.nid = node.nid
WHERE (( (node.status = '1') AND (node.type IN  ('article', 'programme')) AND (node.nid != '68') AND (field_data_field_related_article.field_related_article_tid IN  ('54')) )OR( (node.status = '1') AND (node.type IN  ('article', 'programme')) AND (node.nid != '68') AND (field_data_field_related_delivery.field_related_delivery_value IN  ('distance')) ))AND(( (na.gid = '0') AND (na.realm = 'all') )OR( (na.gid = '0') AND (na.realm = 'domain_site') )OR( (na.gid = '3') AND (na.realm = 'domain_id') ))AND (na.grant_view >= '1') 
GROUP BY node_title, nid
ORDER BY node_title ASC

Issue fork drupal-1766338

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

John Pitcairn’s picture

Title: Incorrect filter group OR behavior, LEFT JOIN changed to INNER JOIN in query » Regression: Incorrect filter group OR behavior, LEFT JOIN changed to INNER JOIN

7.x-3.3 also produces a LEFT JOIN, and so does 7.x-3.0. This behavior in 7.x-3.4 and 7.x-3.5 appears to be a regression?

The commit that changed the behavior is:

commit 994acb299405ff0651706c020cf5d4e6d689e8b3
Author: Daniel Wehner
Date: Fri Aug 17 13:11:59 2012 +0200
Issue #1494884: Use many_to_one for the field_list filter

Ravenight’s picture

I can report the group by function is not working too. I upgraded from 7-3.3 to 7-3.5 and my views with simple grouping by month no longer group.

Code: (group by is not included in the query)

SELECT node.changed AS node_changed, history.timestamp AS history_timestamp, node.created AS node_created, node.title AS node_title, node.nid AS nid, 'node' AS field_data_body_node_entity_type
FROM 
{node} node
LEFT JOIN {history} history ON node.nid = history.nid AND history.uid = '1'
WHERE (( (node.status = '1') AND (node.type IN  ('article')) ))
ORDER BY node_changed DESC
LIMIT 5 OFFSET 0


Grouping should be on the node.created field and is setup to do so in the settings.

Okay my issue was caused by theme developer and simplehtmldom modules. When these are both enabled, the group by is not inserted into the query. I turned them off and views 7-3.5 started working as it had been.

John Pitcairn’s picture

This issue is not about SQL GROUP BY

It is about creating views filter OR groups, which should use LEFT JOIN for the optional filter field tables, but now use INNER JOIN.

mariusart’s picture

Hi. I've the same problem.
how i can resolve it?

thanks

xenophyle’s picture

Status: Needs review » Active

I have the same problem and have temporarily plugged the hole by changing includes/handlers.inc line 896 in function ensure_my_table() from

          // query optimization, INNER joins are slightly faster, so use them
          // when we know we can.
          $join = $this->get_join();
          if (isset($join)) {
            $join->type = 'INNER';
          }

to

          // query optimization, INNER joins are slightly faster, so use them
          // when we know we can.
          $join = $this->get_join();
          if (isset($join)) {
            $join->type = 'LEFT';
          }

I haven't had time to text extensively, but it hasn't broken any of my other views so far.

EDIT: This isn't meant as a long-term solution. I just wanted to post a quick fix that worked in my case. If you use this, you should at least check that your other views work as expected. In summary, use at your own risk.

John Pitcairn’s picture

I'm staying at 3.3+dev for now.

I'm pretty sure doing what you have may have unintended consequences somewhere. The commit that broke things simply changes the parent class for this specific handler.

I'll roll a patch that just reverts the commit from #1494884: Why is there no "is all of" operator for select list filters?, but if anyone is relying on that new behavior, the patch will revert that too.

John Pitcairn’s picture

Status: Active » Needs review
FileSize
1.04 KB

Here's the patch as above. It applies to 7.x-3.x-dev or 7.x-3.5.

Marking needs review to hopefully attract a little attention, but my feeling is that simply reverting may not be the way to go since others will be using the new filter behavior. That needs to be fixed so it doesn't break filter grouping.

Jorrit’s picture

It works for me, however: all list-based views have to be re-edited and saved after the patch commit.

liquidcms’s picture

i had the same issue when going from 3.3 to 3.5; but saw a few different things

- i have now an INNER join where there used to be a LEFT (as reported)
- also have and AND in my WHEREwhere the OR used to be
- the OR'ed filter groups, even though they showed correctly in the views admin form; when i go to rearrange, even though i see a 2nd filter group; all of the filters are in the first group (hence the AND). moving them to the 2nd group and re-saving fixes the AND back to an OR

the incorrect inner join is being used with a boolean field; if that makes any difference.. trying patch out now.

liquidcms’s picture

the fix in #5 fixes for me; not sure what the patch #7 is about; doesn't seem to be related to this issue.

Jorrit’s picture

Patch 7 also worked for me, I overlooked patch 5. I will try it tomorrow. I think it is better to have a patch that changes as little as possible.

John Pitcairn’s picture

@liquidcms: Patch #7 simply reverts the bad commit that produced the incorrect behaviour. The changes made in that commit were very simple, do a single thing, affect a single file (changing the filter handler class inheritance) and are easily reversible. If the patch at #7 does not fix the issue for anyone, then they probably have a different issue.

The change in #5 (there is no patch there) will force a LEFT JOIN even where it is known to be safe to use INNER JOIN. The bad commit did not touch include/handlers.inc - I do not think attempting to patch it there is appropriate, there is nothing broken there to fix.

@Jorrit: I think it is better to have a patch that fixes only the broken filter handler.

liquidcms’s picture

yes, patch in #7 works as well (changes from #5 reverted)

Mark_L6n’s picture

Status: Active » Needs review

The patch in #7 works for me as well.

John Pitcairn’s picture

I'm going to re-open #1494884: Why is there no "is all of" operator for select list filters?, in the hope that it will generate some discussion.

We probably can't expect this patch to be committed as-is since it will break the new feature introduced in that issue.

Taxoman’s picture

hass’s picture

Is the workbench issue now a views bug? Cannot review on mobile :-(

hass’s picture

Priority: Normal » Critical
John Pitcairn’s picture

Priority: Critical » Normal

I don't think this is a critical views bug.

hass’s picture

If a large number of valid views is broken and several modules I think it is.

Mark_L6n’s picture

I'd agree with hass...since this likely breaks a huge number of views, I don't understand why it wouldn't be 'critical'.

John Pitcairn’s picture

Set it back to critical then. Somebody further up the food chain will probably yell at you ;-)

Mark_L6n’s picture

Priority: Normal » Critical

OK :-) Apologies to you guys working so hard on putting Views in core (my favorite of the many pieces of good news for D8).
As a summary, this issue is causing views with a SQL query containing a logical structure as simple as the following to not work correctly:

  AND A, B
OR
  AND X, Y

Given such a basic structure, it's likely that a huge number of views are not working correctly, so the priority has been changed to critical.

drewish’s picture

Yeah, this is definitely a critical bug. It basically broke a bunch of our views.

Preston McMurry’s picture

I made the #7 patch some weeks ago, and everything worked.

A few weeks pass ...

... and view is back to old bad behavior. Checked patch, and it is still in place:

<?php

/**
 * @file
 * Definition of views_handler_filter_field_list.
 */

/**
 * Filter handler which uses list-fields as options.
 *
 * @ingroup views_filter_handlers
 */
class views_handler_filter_field_list extends views_handler_filter_many_to_one {

  function get_value_options() {
    $field = field_info_field($this->definition['field_name']);
    $this->value_options = list_allowed_values($field);
  }
}

Not sure what else might be going on ...

-----

edit #1: I looked at the current dev release ( http://ftp.drupal.org/files/projects/views-7.x-3.x-dev.zip ) and it contains the unpatched code.

John Pitcairn’s picture

This patch has not been committed to dev, you'll need to re-patch every time you update.

Preston McMurry’s picture

Have not updated, just trying to find code that works. See #24. Patch still in place, but error has returned regardless.

Also tried code from the 3.3 release ( http://drupal.org/node/1451068 ) and it failed as well. Probably because the function name is different than in the patch.

John Pitcairn’s picture

If the example you posted at #25 is the current module code you are running, then it isn't patched. Many-to-one is the new, faulty behaviour.

Preston McMurry’s picture

Agh. You are correct. That was a whole day wasted because someone on else on the project team unwisely fiddled my previously applied (and functional) patch.

dealancer’s picture

Applied, but I am still having this issue again.

dawehner’s picture

So I totally see all your points that the initial in #1494884: Why is there no "is all of" operator for select list filters? change was wrong
though I'm wondering how much we would break by moving it back.

At the same time we then probably would need some code for converting new created views back, similar like the current init() code does it and maybe even add support for "is all of". What do you think?

John Pitcairn’s picture

I have never yet needed to use the "is all of" operator so I don't personally care what happens to that. But I guess we are now far enough down the track that there needs to be a way to continue to support it without breaking anything else, so yeah.

magtak’s picture

This also occurs in 6.x-2.16. Should we await a solution? To avoid hacking/patching I changed my model a bit.

runeasgar’s picture

subscribe.. this is crippling a view that I need for a site I'm building. I don't think it's possible to build the view without this working properly.

jacquelynfisher’s picture

I agree with runeasgar. This issue is breaking a view that is needed for a site that is almost ready to go live.

sorin.eugen’s picture

For the issue with INNER JOIN instead of LEFT JOIN, without adding the patch in #7, you can select the Reduce duplicates checkbox from the first field in OR group filter and will transform your query to LEFT JOIN.
For more info check handlers.inc at line 890:
if ($this->handler->operator == 'or' && empty($this->handler->options['reduce_duplicates']))
which makes your query use INNER JOIN, so checking the reduce duplicates option takes you to line 960, using LEFT JOIN.

EDIT: You still need to export your views to code.

klausi’s picture

Status: Needs review » Needs work

Patch from #7 works for me as interim solution in my drush make file.

As @dawehner said in #31 we cannot commit this as is => needs work.

I have no idea how to resolve this appropriately as I don't have the big picture of implications, so ideas welcome.

John Pitcairn’s picture

Version: 7.x-3.5 » 7.x-3.x-dev

Version should be dev. Patch at #7 still works for 7.x-3.7 I think.

skessler’s picture

I applied the patch in #7 against 7.x-3.7 and it is not working for me.

I had thought this was an issue with Field Collections but it may be this issue. I had opened this up as #1993298: Views does not work with OR .

John Pitcairn’s picture

If the patch applies it should work, unless your problem is elsewhere.

trapper-1’s picture

#36 works for me

racked my brain on this for many hours thinking "usually my brain/logic is wrong, not the program"....after switching around my logical operators several different ways I broke down to digging into the SQL. Quickly found this issue of 'inner join' and this helpful article.

lgomezma’s picture

Patch #7 worked for me too. I think this should be included in the next release.

John Pitcairn’s picture

@Igomezma: this patch will never be included in any release. See #31 and #32.

p0832414’s picture

Patch #7 saved my day. Thank you !

skyredwang’s picture

#36 works for me

ikeigenwijs’s picture

I do not like to hack the module,
if the patch works it should be added to dev.

My solution witch worked for my situation is to negate the query.
instead of
Contentype=A or B
And
Tax_contentA= value1
or
Tax_contentB=value2

I made
Contentype=A or B
And
Tax_contentA not one of (all the other values except value1)
And
Tax_contentB not one of (all the other values except value2)

Which came out as a query with Left join and works

kdmarks’s picture

#36 worked for me. Thank you so much for the fix.

Kimberley_p’s picture

#36 sorted it our for me

jmoruzi’s picture

Thought I was going crazy because I couldn't figure out why my filter wasn't working, but #36 worked for me as well. Thanks sorin.eugen.

DanChadwick’s picture

Fixing the many-to-one helper (used by the many-to-one filter) will be nontrivial. It seems riddled with INNER joins, none of which will work when the filter group operator is OR or when the inter-filter group operator is OR. There are also "summary joins", which use INNER and I'm unsure about.

I wish I could offer a patch, but after looking at it for a couple of hours, it's clear that someone that really understands the architecture of how joins are determined needs to do this. In the interim, I'm using the reduce duplicates workaround.

tim.plunkett’s picture

#935984: or filter uses inner join for optional fields thus excluding expected results was marked a duplicate of this, but that was about terms (the bug I'm seeing) not fields per-se (the bug described here).

John Pitcairn’s picture

Patch at #7 still works with 7.x-3.8 for me, reverting the changes committed in #1494884: Why is there no "is all of" operator for select list filters?. I have no "reduce duplicates" checkbox available for any of the filters.

geerlingguy’s picture

Just wanted to note that this bit me too, noticed the INNER JOIN was excluding half the results, and just checking the "Reduce Duplicates" box on the boolean field that changed the query from LEFT to INNER switched it back to a LEFT JOIN, and all was well. See also (on Drupal Answers): Changing an inner join to a left join in views 3.3?

idebr’s picture

I found another workaround when I was working around this bug.

Inner join:
Node status = 1
Node promoted = 1
AND
Field value = 1 OR
Field is empty

Left Join:
Node status = 1
Node promoted = 1
AND
Field is empty OR
Field value = 1

BrightBold’s picture

Thanks sorin.eugen for the workaround in #36. I used "reduce duplicates" on the field that was causing the problem and that fixed it. That's much easier than continuing to have to remember to re-patch Views every time I upgrade!

JonMcL’s picture

I just applied to 7.x-3.8 and it fixed the issue for me. This seems like a truly critical (regression) bug. I know the maintainers are probably focused on D8. Has anyone tested if this is not an issue in D8 or does it need to be fixed there first?

liquidcms’s picture

The patch in #7 has always worked for me; but i just made a simple filter arrangement today as: http://screencast.com/t/2awrl0pfbo

and i was getting inner join (broken)

until i did the solution in #36 and set Reduce Duplicates on one of the filters.

Simon Georges’s picture

#36 worked for me as well, thanks for the tip.

dbazuin’s picture

The workaround from #46 did work for me.
I must add it did needed some experimenting with the order of the filter items and groups to get it working.

JayDarnell’s picture

I would be interested in a long term solution for this issue as well. Based on everything I've read here I'm hesitant to build a complex view where this issue would ultimately arise and apply patches that may not work long term.

tobiberlin’s picture

After applying the patch I had to refactor some of my views - usually those which used a field as a filter. When I opened the views administration page of such a view an error occurred:

Notice: Undefined index: or in views_handler_filter_in_operator->admin_summary() (line 307 of \views\handlers\views_handler_filter_in_operator.inc).

Additionally in preview it was stating that there is not a valid operator. When opening the settings of this filter no operator was chosen. I needed to re-activate the "Is one of" or another operator and the errors disappeared.

Best,
Tobias

roynilanjan’s picture

patch #7 is not a proper solution according to view architecture, it basically tries to by-pass the views_handler_filter_many_to_one instead tries to use the views_handler_filter_in_operator, which is basically parent class of views_handler_filter_many_to_one. problem is mentioned in #5, this is the actual reason to get the INNER join in the query

John Pitcairn’s picture

@roynilanjan patch #7 is not a solution because it simply reverts the git commit that caused this issue. The views_handler_filter_field_list handler was previously a child of the views_handler_filter_in_operator class. The patch corrects the grouping behaviour (by reverting) but makes no attempt to update any existing views using list fields as a filter.

The patch was intended as a short-term fix to restore correct OR group behaviour, but now we are 3 years on with no real fix in sight...

matthew.lavoie’s picture

After spending far too many hours trying to figure out what was wrong, and finally searching through the issue queue, I found this. I was able to use the workaround in #36 to get the View I am trying to build to work as expected.

Seems kind of absurd we're going on three years to resolve what seems to be a simple regression...

realgiucas’s picture

#36 seems to work for me too

Nicolas Bouteille’s picture

workaround in #36 works for me but I have to check the Reduce duplicates checkbox on all filters that propose it (some don't), and I have do do it for filters in all of my 3 groups.

John Pitcairn’s picture

Patch at #7 still applies to Views 7.x-3.14

mattew’s picture

Hi,
I encountered the same issue when trying to filter on list fields which are not mandatory (could be empty) so the IN clause could not works and the INNER JOIN reduce the results to entities which HAVE data existing in the fields...

My case was :
some other exposed filters...
AND
field1 is one of a OR b (Exposed, Allow multiple selections)
AND
field2 is one of x OR y (Exposed, Allow multiple selections)

Result: nothing, usage of INNER JOIN, etc.

My solution came from #46 (thanks!), and I came to something like:
some exposed filters...
AND
field1 is one of a OR b (Exposed, Allow multiple selections)
OR
field1 is not one of a AND b (both options selected in the filter params)
AND
field2 is one of x OR y (Exposed, Allow multiple selections)
OR
field2 is not one of x AND y (both options selected in the filter params)

It's quite complicated, but it works...

Note: I also tried "field1 is empty" for the second test in the OR clause, but without success, all entities were shown regardless of exposed filters values.

jenlampton’s picture

I'm running Views 7.x-3.14 and I don't understand how to apply the recommended work-around in #36. There is no "reduce duplicates" checkbox on the filter settings. Does this only apply to views that are using aggregation?

My view is a simple one as described in #23, with an OR being counteracted by the INNER JOIN in the query.

I'm hesitant to use the patch in #7 because it's been years since that feature went in. Reverting it now may break I-don't-know-how-many other views on the site.

Can someone explain again why the solution in #5 is not the right approach? I understand that was not the file that was changed the day that everything broke, but that doesn't mean it is not the place for a solution today.

The following code comment is present:

// query optimization, INNER joins are slightly faster, so use them
// when we know we can.

It sounds like we are using inner joins here even when we know we can't. Is there a way we can expand the logic to properly determine if the JOIN should be INNER or LEFT? Perhaps adding a check to see if any of the filters are using OR instead of AND?

Attaching a patch based on #5, but leaving as NW since I expect this will cause a minor performance regression. Still better than broken views IMHO.

rli’s picture

Agree with @jenlampton. The comment in the code apparently indicated that we can NOT use INNER join.
Applying the patch in #69 fixed the issue temporarily.

John Pitcairn’s picture

@jenlampton: No, I wouldn't use #7 unless you have been using it consistently since then and know you have no views that use the "new" handler.

susannecoates’s picture

@jenlampton Your patch views-critical_inner_vs_left_join-1766338-69 worked for me, Thanks!

pifagor’s picture

Status: Needs work » Needs review
FileSize
21.11 KB

Selected checkbox "Reduce duplicates", the image given me to realize the request because LEFT JOIN and not INNER JOIN because.

jenlampton’s picture

Patch still applies cleanly to 7.x-3.15.

brulain’s picture

5 years later, the patch still works : what's the police doing ?

jenlampton’s picture

Patch in #69 still applies cleanly to 7.x-3.16.

luenemann’s picture

Agreeing with @jenlampton. The use of "INNER JOIN" here is a false optimization.

My issue is the following (stripped down example):

  1. to a content type with existing content: add a boolean field
  2. to a view for published content of that type: add the new field to the filter as OR - Is one of - 1
  3. Expected: No change on the result list
  4. Actual: No results

Possible Solutions:

  1. save all existing content - "missing" values are written to the new field table - make the DB consistent
  2. change new criteria to Is none of - 0 - negate the condition
  3. change new criteria to Reduce duplicates - checked
  4. apply patch #1766338-69: Incorrect filter group OR behavior, LEFT JOIN changed to INNER JOIN
  5. ...

I guess the query optimization is based on the assumption that the relationship of fields and nodes is consistent. Meaning there is a value row in the field table for every node of a given type. But Drupal allows this inconsistency.

I've tried to finde the introduction of this optimization and found #248749: Consider Use of Inner Joins for Taxonomy Filters . It was introduced in views-6.x-2.0-alpha5 (http://cgit.drupalcode.org/views/commit/?id=1f4cbd4).

It was intended for taxonomy filters but now applies to "boolean" filters as well (by #1494884: Why is there no "is all of" operator for select list filters?).
I've checked it - the false assumption of consistency applies to taxonomy filters as well...

Is this optimization still in views for Drupal 8? The use case above with a boolean field is no issue in D8 (so with less options to select from...).

So how to get patch #1766338-69: Incorrect filter group OR behavior, LEFT JOIN changed to INNER JOIN applied to views?
IHMO the issue title is misleading - its an old bug, not a regression...
Can someone help to rephrase it?

luenemann’s picture

I've checked my Issue from #77 on D8 with a List (text) ans Taxonomy Term field. And it still doesn't work there.

#2559961: ManyToOneHelper ignores group configuration for some cases Mentions this one

jibran’s picture

Title: Regression: Incorrect filter group OR behavior, LEFT JOIN changed to INNER JOIN » Incorrect filter group OR behavior, LEFT JOIN changed to INNER JOIN
Project: Views (for Drupal 7) » Drupal core
Version: 7.x-3.x-dev » 8.3.x-dev
Component: Code » views.module
Priority: Critical » Major
Status: Needs review » Needs work
Issue tags: +needs backport to 7.x-3.x

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

jenlampton’s picture

Patch in #69 still applies cleanly to 7.x-3.17.

jenlampton’s picture

Patch in #69 still applies cleanly to 7.x-3.18.

ckaotik’s picture

Is there a way we can expand the logic to properly determine if the JOIN should be INNER or LEFT? Perhaps adding a check to see if any of the filters are using OR instead of AND?

@jenlampton Regarding this, isn't this only a problem when using OR conjunctions? Can't we simply check for this, e.g.

$group = isset($this->handler->options['group']) ? $this->handler->options['group'] : FALSE;
if (isset($join) && ($group === FALSE || $this->handler->query->where[$group]['type'] == 'AND')) {
 $join->type = 'INNER';
}
ckaotik’s picture

Status: Needs work » Needs review
Issue tags: +Needs tests
FileSize
988 bytes

I've attached a patch against 8.4 for my suggestion above. Reviews and better ideas are welcome :)
Also added the "Needs tests" tag.

adam-delaney’s picture

Patch #7 worked for 7.x-3.x. Thanks for the fix.

andyanderso’s picture

@jenlampton Thanks for the patch in #69. I think your solution is right-on, and I don't think that there is a large enough performance hit for this not to be included in the next release. THANK YOU!

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

alison’s picture

#84 applied cleanly for me on 8.4.5, but did not fix the problem -- below is the query generated by my view, before and after the patch at #84 -- it looks like, one of the JOINs changed, but the the "AND" did not change to an "OR":

pre-patch...

SELECT node_field_data.langcode AS node_field_data_langcode, node_field_data.title AS node_field_data_title, node_field_data.nid AS nid
FROM 
{node_field_data} node_field_data
LEFT JOIN {node__field_location_level} node__field_location_level ON node_field_data.nid = node__field_location_level.entity_id AND node__field_location_level.field_location_level_value = 'state'
INNER JOIN {taxonomy_index} taxonomy_index ON node_field_data.nid = taxonomy_index.nid
LEFT JOIN {taxonomy_index} taxonomy_index2 ON node_field_data.nid = taxonomy_index2.nid AND taxonomy_index2.tid != '109'
LEFT JOIN {node__field_associated_parent_page} node__field_associated_parent_page ON node_field_data.nid = node__field_associated_parent_page.entity_id AND node__field_associated_parent_page.deleted = '0'
WHERE (((node__field_location_level.field_location_level_value IS NULL)) AND ((taxonomy_index.tid = '109')) AND ((taxonomy_index2.tid = '98')) AND ((node__field_associated_parent_page.field_associated_parent_page_target_id = '71' ))) AND ((node_field_data.status = '1') AND (node_field_data.type IN ('location_filtering')))
ORDER BY node_field_data_title ASC

post-patch...

SELECT node_field_data.langcode AS node_field_data_langcode, node_field_data.title AS node_field_data_title, node_field_data.nid AS nid
FROM 
{node_field_data} node_field_data
LEFT JOIN {node__field_location_level} node__field_location_level ON node_field_data.nid = node__field_location_level.entity_id AND node__field_location_level.field_location_level_value = 'state'
LEFT JOIN {taxonomy_index} taxonomy_index ON node_field_data.nid = taxonomy_index.nid
LEFT JOIN {taxonomy_index} taxonomy_index2 ON node_field_data.nid = taxonomy_index2.nid AND taxonomy_index2.tid != '109'
LEFT JOIN {node__field_associated_parent_page} node__field_associated_parent_page ON node_field_data.nid = node__field_associated_parent_page.entity_id AND node__field_associated_parent_page.deleted = '0'
WHERE (((node__field_location_level.field_location_level_value IS NULL)) AND ((taxonomy_index.tid = '109')) AND ((taxonomy_index2.tid = '98')) AND ((node__field_associated_parent_page.field_associated_parent_page_target_id = '71' ))) AND ((node_field_data.status = '1') AND (node_field_data.type IN ('location_filtering')))
ORDER BY node_field_data_title ASC

 
(...)
For comparison, here's the same query using the patch at #29 over on #2559961: ManyToOneHelper ignores group configuration for some cases -- see the nested "OR" in the last part of the WHERE clause:

SELECT node_field_data.langcode AS node_field_data_langcode, node_field_data.title AS node_field_data_title, node_field_data.nid AS nid
FROM 
{node_field_data} node_field_data
LEFT JOIN {node__field_location_level} node__field_location_level ON node_field_data.nid = node__field_location_level.entity_id AND node__field_location_level.field_location_level_value = 'state'
INNER JOIN {taxonomy_index} taxonomy_index ON node_field_data.nid = taxonomy_index.nid
LEFT JOIN {taxonomy_index} taxonomy_index2 ON node_field_data.nid = taxonomy_index2.nid AND taxonomy_index2.tid != '109'
LEFT JOIN {node__field_associated_parent_page} node__field_associated_parent_page ON node_field_data.nid = node__field_associated_parent_page.entity_id AND node__field_associated_parent_page.deleted = '0'
WHERE ((node__field_associated_parent_page.field_associated_parent_page_target_id = '71' )) AND (((node_field_data.status = '1') AND (node_field_data.type IN ('location_filtering')) AND ((node__field_location_level.field_location_level_value IS NULL))) AND (((taxonomy_index.tid = '109')) OR ((taxonomy_index2.tid = '98'))))
ORDER BY node_field_data_title ASC

 
(...)
Bottom line for *me* is that I'm all set for now, using #29 from the aforementioned issue, but I figured I'd still share my test results over here!

ckaotik’s picture

@alisonjo2786 Thanks for the feedback and the example queries!

I think that issue (#2559961: ManyToOneHelper ignores group configuration for some cases) and this one are actually different problems, and depending on the use case, you would need fixes for both, i.e. have both the INNER JOIN change to a LEFT JOIN (this issue) and apply the OR/AND operator as defined in the filter group.
Have you tried using both patches at once?

Disecting your query generated with issue 2559961, the simplified WHERE structure is this:

(node__field_associated_parent_page.field_associated_parent_page_target_id = '71' )
AND 
(node_field_data.status = '1') 
AND 
(node_field_data.type IN ('location_filtering')) 
AND 
(node__field_location_level.field_location_level_value IS NULL)
AND 
(
	(taxonomy_index.tid = '109')
	OR 
	(taxonomy_index2.tid = '98')
)

This uses an INNER JOIN {taxonomy_index} taxonomy_index.

The WHERE query part from #84 would be this (reordered and re-indented):

(node__field_associated_parent_page.field_associated_parent_page_target_id = '71' )
AND 
(node_field_data.status = '1') 
AND 
(node_field_data.type IN ('location_filtering'))
AND 
(node__field_location_level.field_location_level_value IS NULL)
AND 
(taxonomy_index.tid = '109')
AND 
(taxonomy_index2.tid = '98')

This one uses a LEFT JOIN {taxonomy_index} taxonomy_index.

In your case this should not make a difference, but if you weren't joining with the same table for both OR connected conditions, the result would most likely still be wrong if only one table has a JOIN partner. Then the whole query would fail, instead of just one of the ORs.
Basically, this issue's patch only handles the LEFT vs. INNER JOIN logic, whereas the other one only handles the AND vs. OR condition logic.
Using one fix without the other still produces unexpected results.

I've also added #2580265: entity query nested conditions must use LEFT joins when any of the parent condition groups is using OR as a related issue, this is getting quite messy.

stellarvisions’s picture

Do we still need to apply patch #69 to views 7.x-3.20? looks like yes but checking.

[ I patched by had because the line numbers have changed, but a simple patch]

andyanderso’s picture

It does look like this problem still exists, but the patch in #69 no longer applies. We will have to do some digging to see how to make it apply.

andyanderso’s picture

I re-did the patch using the same change as jenlampton in #69 - THANK YOU for creating the original. It would be great to get this into the next views release.

Status: Needs review » Needs work

The last submitted patch, 92: views-critical_inner_vs_left_join-1766338-92.patch, failed testing. View results

John Pitcairn’s picture

Not sure why testbot is complaining includes/handlers.inc is missing for 7.x. Let's try this one.

Status: Needs review » Needs work

The last submitted patch, 94: views-critical_inner_vs_left_join-1766338-93.patch, failed testing. View results

John Pitcairn’s picture

Weird. Patch works against current 7.x-dev and 7.x-3.20.

luenemann’s picture

This issue moved to Drupal Core (see #79 #1766338-79: Incorrect filter group OR behavior, LEFT JOIN changed to INNER JOIN)
Drupal 7 does not contain Views.
I think testbot tries to apply the patch to drupal-core. That fails because there is no Views module.

I think the current strategy is to fix d8-views first and to backport the solution to d7-views.

ckaotik’s picture

Status: Needs work » Needs review

I think the current strategy is to fix d8-views first and to backport the solution to d7-views.

I agree, let's get this fixed in D8 so we can backport to D7!

Marking as Needs Review for the only D8 patch we have, in #84 (the problems mentioned in #88 are most likely due to interactions with #2559961: ManyToOneHelper ignores group configuration for some cases).

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

Bug reports should be targeted against the 8.6.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

specky_rum’s picture

fwiw I have a view with grouped filters in the following structure:

group 1
  condition 1
  AND condition 2
AND
group 2
  condition 3
  OR condition 4

I applied the patch in #84 but I also needed the one from here: https://www.drupal.org/project/drupal/issues/2559961#comment-12715853. Together these 2 patches resolved the issue and the view is returning the correct results.

This on D8.6.7

jenlampton’s picture

The patch in #94 still applies cleanly to views 7.x-3.22. Thank you to @John Pitcairn and @andyanderso for re-applying the patch! Sad it wasn't included in the last release, fingers crossed it'll go into the next one!

andyanderso’s picture

+1 to including it in the next 7.x release.

jenlampton’s picture

The patch in #94 still applies cleanly to views 7.x-3.23. RTBC for D7.

@DamienMcKenna would it be useful to create a separate non-core issue for D7 (for tests) or do you prefer to stick to a single issue?

tmin’s picture

+1 to include this in the next release (since apparently it didn't make it to 3.23).

It's a straightforward regression and everyone is more hesitant to apply crucial security updates if there is a possibility for listings in their website to break.

sagesolutions’s picture

I had an issue that with taxonomy terms, the join is still using inner. See https://www.drupal.org/project/drupal/issues/2559961#comment-13291136

group 1
  condition 1
  AND condition 2
OR
group 2
  condition 3
  AND condition 4

I updated the patch to exclude inner joins on taxonomy terms. Please review!

sagesolutions’s picture

Moved parenthesis to correct location in patch. Please review this one!

Lendude’s picture

Status: Needs review » Needs work
+++ b/core/modules/views/src/ManyToOneHelper.php
@@ -162,9 +162,11 @@ class ManyToOneHelper {
+          if (isset($join) && ($group === FALSE || ($this->handler->query->where[$group]['type'] == 'AND' && $this->handler->options['plugin_id'] != 'taxonomy_index_tid'))) {

Having a hardcoded reference to the 'taxonomy_index_tid' plugin in the ManyToOneHelper sounds less than ideal. Is there no other way to detect that this is needed?

sagesolutions’s picture

Status: Needs work » Needs review

@Lendude,

The only time I see is using the INNER join is when one (or more) of the fields are taxonomy terms. If its not a taxonomy term, then it will use the LEFT join.

Ideally it should check if is an OR grouping in the group, or any parent group, but I don't see a way to do that.

mlncn’s picture

Status: Needs review » Reviewed & tested by the community

Agreed that ideally we don't have hardcoded corrections, but until another way is contrived, let's not let the perfect be the enemy of the good and get this needed fix in.

Heisen-blue’s picture

Like @specky_rum, I had to also apply the patch from ManyToOneHelper ignores group configuration for some cases. It works perfectly now :)
Drupal 8.7.5

pifagor’s picture

Version: 8.6.x-dev » 8.8.x-dev

We need to update the core version to the current one

pifagor’s picture

Version: 8.8.x-dev » 8.9.x-dev
Krzysztof Domański’s picture

FileSize
49.88 KB

The reason that the problem is related to taxonomy filter may be that this filter allows you to select "Reduce duplicates". Other filters do not have this setting.

Reduce duplicates settings

https://git.drupalcode.org/project/drupal/blob/8.8.x/core/modules/views/src/ManyToOneHelper.php#L160.

if ($this->handler->operator == 'or' && empty($this->handler->options['reduce_duplicates'])) {
  if (empty($this->handler->options['add_table']) && empty($this->handler->view->many_to_one_tables[$field])) {
    // query optimization, INNER joins are slightly faster, so use them
    // when we know we can.
    $join = $this->getJoin();
    if (isset($join)) {
      $join->type = 'INNER';
    }

See also https://www.drupal.org/project/drupal/issues/2559961#comment-13347356

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 106: 1766338-106.patch, failed testing. View results

jenlampton’s picture

The patch in #94 still applies cleanly to views 7.x-3.24.

phjou’s picture

I had a similar bug on my SQL request from the view with Drupal 8.8.

My filters were like this:
(Condition 1 AND Condition 2) OR (Condition 3 AND condition 4)

And views just translate it like this:
(condition 4 AND Condition 1 AND Condition 2) OR (Condition 3)

I just checked the ""Reduce duplicates" option on my condition 4 and the SQL query was good again... Weird behaviour.

tmin’s picture

Verifying that the patch in #94 cleanly applies in 7.x-3.24.

@DamienMcKenna would it be useful to create a separate non-core issue for D7 (for tests) or do you prefer to stick to a single issue?

Since it's been way too long and the current issue is becoming a beast where the solved D7 part gets left behind for no good reason, I suppose that we move to the "duplicate" issue for D7 which can be found here.

It's been 8 years since this issue has been created and even though I'm all for backporting the eventual solution that may be found for D8, I'd prefer if we don't keep an obvious bug in the D7 branch and force users to re-apply patches on every Views update.

I'm updating this issue in the Views issue queue with the patch found in #94.

Please continue the discussion there for the 7.x branch of the issue and if there is a solution in the 8.x branch we'll see what we're going to do about backporting it.

jenlampton’s picture

I've added an additional check for grouping to the patch from #94 and posted an updated patch in the other issue. Noting here for those that were following this issue for a Drupal 7 fix.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

pameeela credited zebda.

pameeela’s picture

I'm closing #2935113: No results when using the same vocab twice as exposed filter as a duplicate and I believe that it has a more concise set of steps to reproduce this, but I haven't been following this issue so I don't want to make major changes to the issue summary.

The steps are:

  1. Install Drupal
  2. Create an article with the tag 'test'
  3. Create a view of articles and add 'Tags' as an exposed filter with 'Is one of', twice, using OR operator
  4. Set both filters to 'test'
  5. Confirm there are no results, when you should expect the test article to appear

I note that it works as expected if the exposed filters are set to 'Is all of'.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

wranvaud’s picture

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

liquidcms’s picture

I have a simple view with a filter to filter out based on 2 options in a list field (field_campaign_type). But as this was added after content was created; many nodes simply have the value as NULL.

With filter as: published AND (field = 'option A' OR field is empty)

This doesn't work at all as the OR isn't used in the query. Adding the "reduce duplicates" option to the 2 ORed filters seemed to fix in that it added the OR into the WHERE clause. But then, when setting some of my nodes to 'option B', those still show up as well. I see the query has an AND added to one of the LEFT JOINs:

LEFT JOIN node__field_campaign_type node__field_campaign_type_value_0 ON node_field_data.nid = node__field_campaign_type_value_0.entity_id AND node__field_campaign_type_value_0.field_campaign_type_value = '0'

removing the "AND node__field_campaign_type_value_0.field_campaign_type_value = '0'" and the view works as expected.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

vasike made their first commit to this issue’s fork.

vasike’s picture

Status: Needs work » Needs review

new MR available
the condition to use INNER for join: Only if there is no group with OR operator.
LEFT JOIN it's by default.

However this will not work without the solution for https://www.drupal.org/project/drupal/issues/2559961
which means that it can be really tested.

And a scenario to reproduce.
1. Create 2 taxonomies
and add some terms
2. Create 2 taxonomy term reference fields
And create different content
3. Create a view with 2 filters for those 2 fields
4. Play with AND and OR operators for those filters

Again the patch from https://www.drupal.org/project/drupal/issues/2559961 it's needed in terms to get the right results.

p.s. i have no idea why those 2 issues were separated.

vasike’s picture

Tests available on related ticket MR

please check
https://www.drupal.org/project/drupal/issues/2559961#comment-15085241

smustgrave’s picture

Status: Needs review » Needs work

If this ticket isn't going to add tests and be dependent on another. Then it should be postponed.

But even then I think the tests should be different, as the tests on #2559961: ManyToOneHelper ignores group configuration for some cases should be testing that issue. If the tests are testing the same thing then these tickets would be dups of each other.

vasike’s picture

Status: Needs work » Closed (duplicate)

As the solution and tests are in the MR of the related issue ... i would say this is kind of duplicate.

closed also the MR ... test can't be added without the solution from related issue.

SoulReceiver’s picture

Status: Closed (duplicate) » Needs review

This is still an issue, but applying the code in the merge request worked very nicely. Can this be rereviewed?

smustgrave’s picture

Status: Needs review » Postponed (maintainer needs more info)

As is the MR can't be merged as it's closed and No test coverage

If this ticket were to continue issue summary would have to be updated to standard template.

But would see if related issue that this was closed for solves the issue, depending on core version you are on.

SoulReceiver’s picture

FileSize
109.18 KB

Currently running Drupal 10.2.4, and when creating a View and adding an OR condition of two taxonomy fields, the resulting JOIN's on these tables remains as an INNER rather than a LEFT:

INNER join instead of LEFT join.

vasike’s picture

Status: Postponed (maintainer needs more info) » Needs review

It seems the changes for this issue were not included in the related issue commits.

So i re-opened the MR and added the tests code from there.
i think we are back to review.

longwave’s picture

vasike’s picture

Status: Needs work » Needs review

@longwave thank you for the "guidance"
Also @SoulReceiver comments helped.
i remembered some things about this issue.

indeed the previous tests added tried for the related issue which actually solved this specific case when we have multiple "Has taxonomy term" filters.
And this multiple uses will bring "LEFT JOIN" from the second filter .. which means the tests will pass anyway.

The trick ... having the second taxonomy filter as "field filter". It still uses the "taxonomy_index_tid" filter plugin so, I think we're still in the right place and (+) it adds and extra test for taxonomy fields.
Also removed some tests that weren't that relevant here.

https://git.drupalcode.org/issue/drupal-1766338/-/jobs/1304700

I'm more than aware it's not the perfect/complete solution for the fix ... but at least it could save the day.
To save the (Views Filter Grouping) Universe ... I think another issue is needed ... starting maybe with some kernel tests about those FIlters GROUPING JOINS.

p.s. Views and tests needs a lot of efforts ... still

smustgrave’s picture

Status: Needs review » Needs work
Issue tags: +Needs issue summary update

Can the issue summary be updated using standard template.

Original issue appears to have been written for D7.

vasike’s picture

Issue summary: View changes
Status: Needs work » Needs review

Summary updated.

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: -Needs issue summary update +Needs Review Queue Initiative

Issue summary appears much better

Ran test-only feature

There was 1 error:
1) Drupal\Tests\taxonomy\Functional\Views\TaxonomyIndexTidUiTest::testFilterGrouping
Behat\Mink\Exception\ResponseTextException: Failed asserting that the page matches the pattern '/ioy19583/ui' 1 time(s), 0 found.
Failed asserting that 0 is identical to 1.
/builds/issue/drupal-1766338/core/tests/Drupal/Tests/WebAssert.php:734
/builds/issue/drupal-1766338/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyIndexTidUiTest.php:547
/builds/issue/drupal-1766338/vendor/phpunit/phpunit/src/Framework/TestResult.php:729
ERRORS!
Tests: 5, Assertions: 242, Errors: 1.

So shows coverage.

Manually testing following the steps I believe I am seeing the issue.

s an exposed filter with 'Is one of', twice

I probably would of just used one filter selecting the multiple options but maybe can understand scenarios were you would do it this way.

Change to ManyToOneHelper makes sense.

12 years wow, good job on this one!

alexpott’s picture

I've tried to credit people who helped move this issue on and have been thanked on the issue for their contributions. Obviously with so many comments this can be hard to get right - hopefully I have. Please let me know if I've not.

alexpott’s picture

Version: 11.x-dev » 10.2.x-dev
Status: Reviewed & tested by the community » Fixed

Committed and pushed 0dac7cab32 to 11.x and 1c95773ffe to 10.3.x and c1c3ae32ca to 10.2.x. Thanks!

  • alexpott committed c1c3ae32 on 10.2.x
    Issue #1766338 by vasike, John Pitcairn, sagesolutions, jenlampton,...

  • alexpott committed 1c95773f on 10.3.x
    Issue #1766338 by vasike, John Pitcairn, sagesolutions, jenlampton,...

  • alexpott committed 0dac7cab on 11.x
    Issue #1766338 by vasike, John Pitcairn, sagesolutions, jenlampton,...