Closed (fixed)
Project:
Search API
Version:
8.x-1.x-dev
Component:
Views integration
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
18 Apr 2023 at 13:24 UTC
Updated:
9 Nov 2023 at 07:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
peterjlord commentedHi there,
I seem to be having this issue as well. After (drupal 9) upgrading from search_api 1.28 to 1.29. I've reverted back to 1.28 until there is a patch. I may try and investigate.
Thanks
Comment #3
ericchew commentedHere is a patch to fix it.
I'm not sure if there is a good way to fix the test so that it catches this issue. It is a Unit Test that mocks the SearchApiQuery object and the test is checking mock objects instead of getting the conditions from the actual query (where the conditions were not present).
https://git.drupalcode.org/project/search_api/-/blob/8.x-1.x/tests/src/U...
Comment #4
drunken monkeyThanks for reporting this issue and providing a patch. Also thanks to Mike for pinging me on Slack, spotting the cause and also that the date argument plugin is affected, too. This is indeed quite a bad regression. Even worse that our automated tests didn’t catch it.
However, your proposed solution doesn’t take the new API introduced in #3260862: Add a $add_directly parameter to QueryInterface::createConditionGroup() into account, to which we should definitely still switch. Also, we should also fix the date plugin, while we’re at it.
Patch attached, please test/review!
Comment #5
arefen commentedHi. Thanks, drunken monkey
Patch #4 saved my life
Comment #7
drunken monkeyComment #9
drunken monkeyGood to hear! I’ll take that as a confirmation that the patch worked as expected.
Committed. Thanks again, everyone!
Comment #11
phma commentedWhen can we expect a release for this fix?
Comment #12
it-cru@phma: Fix is included in 8.x-1.30 :)