[11.x] Views OR filter group does not work properly (OR does not affect)

Created on 7 March 2018, almost 7 years ago
Updated 9 May 2023, over 1 year ago


I have views filters configured as it shown at the image
The view shows no result, because OR setting does not affect on SQL Query.

This does not matter whether I select OR or AND operator set in second filter group, the resulting query does not contain OR, so queries with AND and OR are identical, here is formed query:

SELECT node_field_data.sticky AS node_field_data_sticky, node_field_data.created AS node_field_data_created, node_field_data.nid AS nid, taxonomy_term_field_data_node__field_event_section.tid AS taxonomy_term_field_data_node__field_event_section_tid, flagging_taxonomy_term_field_data.id AS flagging_taxonomy_term_field_data_id
FROM 
{node_field_data} node_field_data
LEFT JOIN {node__field_event_section} node__field_event_section ON node_field_data.nid = node__field_event_section.entity_id AND node__field_event_section.deleted = '0'
LEFT JOIN {taxonomy_term_field_data} taxonomy_term_field_data_node__field_event_section ON node__field_event_section.field_event_section_target_id = taxonomy_term_field_data_node__field_event_section.tid
LEFT JOIN {flagging} flagging_taxonomy_term_field_data ON taxonomy_term_field_data_node__field_event_section.tid = flagging_taxonomy_term_field_data.entity_id AND (flagging_taxonomy_term_field_data.flag_id = 'subscribe' AND flagging_taxonomy_term_field_data.uid = '1')
WHERE ((node__field_event_section.field_event_section_target_id = '12')) AND (((node_field_data.promote = '0') AND (node_field_data.status = '1') AND (node_field_data.langcode IN ('en')) AND (node_field_data.type IN ('article'))) AND (flagging_taxonomy_term_field_data.uid IS NOT NULL))
ORDER BY node_field_data_sticky DESC, node_field_data_created DESC
LIMIT 4 OFFSET 0
πŸ› Bug report
Status

Closed: duplicate

Version

11.0 πŸ”₯

Component
ViewsΒ  β†’

Last updated about 11 hours ago

Created by

πŸ‡·πŸ‡ΊRussia Hamulus

Live updates comments and jobs are added and updated live.
  • views

    Involves, uses, or integrates with views. In Drupal 8 core, use the β€œVDC” tag instead.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024