As well as having issues with the UI of Views, it seems to be making some quite strange queries when using filter groups. I've made a video showing these issues, but the basics is that the WHERE part of the query is wrong.

I have two groups, group A, and group B, separated by an OR operator.

For a filter I have in group B, it's placing the WHERE in the wrong position.
WHERE ((node__field_occasion_types.field_occasion_types_target_id = '69')) AND

node__field_occasion_types is a field I only have in group B, so the above is obviously not going to work!

Here's the video:
http://i.imgur.com/jvxsY0H.gif

Comments

danjdewhurst created an issue. See original summary.

MustangGB’s picture

Project: Views (for Drupal 7) » Drupal core
Version: 8.x-3.x-dev » 8.3.x-dev
Component: Code » views.module
Lendude’s picture

Priority: Critical » Normal
Issue tags: -filters, -filter groups, -query

Changing the priority to match the described problem.

The video is pretty clear in indicating there is something strange going on, but some solid steps to reproduce would be nice. I don't think all filter groups are broken in this way, so there must be some other factors here.

catch’s picture

Title: Fitler Group Query WHERE Issues » Filter Group Query WHERE Issues

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.

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.

jeroen.b’s picture

I have this too. It only happens on new filter groups.
When you create a new filter group, it seems to be impossible to add a filter to it. And since it won't save the filter group when it's empty it won't be there after saving the modal either. I had to try 5 times before it actually had saved the filter group with 1 filter in it, after that I was able to add more filters fine.

Lendude’s picture

Status: Active » Closed (duplicate)