Closed (fixed)
Project:
Search API
Version:
7.x-1.x-dev
Component:
Facets
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
20 Oct 2020 at 19:04 UTC
Updated:
11 Jan 2021 at 10:39 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
mvcComment #3
drunken monkeyThanks a lot for reporting this problem! Very strange that I used
is_numeric()instead of just checking for'!'– the latter seems not only more accurate but also faster.Apparently, we initially (in #2450227: Ignore parent terms in facets when operator is OR) made the mistake of assuming that the
SearchApiFacetapiTermclass was only used for taxonomy terms, while “term” there refers to just any single value. We fixed that in #2703675: Undefined index: [value in taxonomy_term_load error, but apparently overlooked this remaining assumption that all filters would either be integers (taxonomy term IDs) or the missing filter. (Still unclear, though, why I thought this was a good idea either way.)Anyways, so much for the history. Your fix looks great, though, in any case, so I’ll just commit it. (Test coverage is very poor in our D7 code anyways, unfortunately, so no need to bother with that.)
Thanks again!