Default group type OR is ignored in SearchApiQuery::build

Created on 20 October 2022, about 2 years ago
Updated 18 February 2023, almost 2 years ago

Problem/Motivation

When a contextual filter uses a conjunction 'OR', the default group in SearchApiQuery::build() will have type 'OR'. But this type is being ignored, $this->query was initialized before with AND and it is not possible to change it.

We've noticed this problem since version 1.26 (because now the base is "$this->query" and before it was a new group).
The changes came from patch here: https://www.drupal.org/node/3029582 .

Steps to reproduce

I'm using a hook_views_query_alter where I add change the contextual filter type to OR.

I believe this problem also affects views_contextual_filters_or now, see: https://www.drupal.org/project/views_contextual_filters_or/issues/3314825 🐛 "OR" operator not working after search_api:1.26 Needs work .

🐛 Bug report
Status

Fixed

Version

1.0

Component

Views integration

Created by

🇵🇹Portugal dxvargas

Live updates comments and jobs are added and updated live.
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