Respect the submission guidelines above! Drupal.org issue forks cause additional work for the project maintainer!

Setup

  • Solr version:
  • 8.3

  • Drupal Core version:
  • 9.2.9,

  • Search API version:
  • 1.19.0,,

  • Search API Solr version:
  • 4.1.12

  • Configured Solr Connector:

Issue

We got flooded by web crawlers on a url containing *__range_slider_min__* and *__range_slider_max__* probably because of some old version of the *facets_range_widget*.

Still, with the provided fix it seems we are keeping the same functionality while preventing the issue again.

CommentFileSizeAuthor
fix-create-filter-query.patch619 bytesb2f

Comments

B2F created an issue. See original summary.

mkalkbrenner’s picture

I don't understand how the patch should be related to "range_slider". Can you provide more details?

mkalkbrenner’s picture

Nevertheless the patch might make sense if another module creates an erroneously query using a multi value operator with a single value.

mkalkbrenner’s picture

But shouldn't we throw an exception instead?

mkalkbrenner’s picture

Title: Operators in createFilterQuery » Be fault tolerant when a single value is provided in combination with a multi-valued operator
Version: 4.1.12 » 4.x-dev
Category: Bug report » Feature request

  • mkalkbrenner committed a2ab5fc on 4.x authored by B2F
    Issue #3253267 by B2F, mkalkbrenner: Be fault tolerant when a single...
mkalkbrenner’s picture

Status: Active » Fixed
DeFr’s picture

Small nitpick, coming in a bit late (sorry about that) : shouldn't the inline comment be above the switch instead of being above the if ?

(As is, when createFilterQuery is called with a scalar $value and '=' as an operator, $value will first be converted to an array at the top of the function, then made scalar again here)

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.