Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
After I updated to Search_API 1.21 I get the following error if make a View with type Multi-index search.
An AJAX HTTP error occurred.
HTTP Result Code: 500
Debugging information follows.
Path: /admin/structure/views/view/full_mis/preview/default/ajax
StatusText: Service unavailable (with message)
ResponseText: Recoverable fatal error: Object of class SearchApiMultiQuery could not be converted to string in SearchApiViewsQuery->build() (line 315 of /var/www/web/drupal7/sites/all/modules/search_api/contrib/search_api_views/includes/query.inc).
Views is on 3.15.
Not sure what went wrong here.
Comment | File | Size | Author |
---|---|---|---|
#3 | error_update_search_api_1_21-2855278-3.patch | 2 KB | bmunslow |
Comments
Comment #2
KingdutchEncountered the same issue after upgrading to Search API 1.21
Comment #3
bmunslow CreditAttribution: bmunslow at SOCIETAT PORTAL DE LLEIDA S.L commentedSame issue here.
The problem lies in the definition of the
SearchApiMultiQuery
class, which doesn't implement the__toString
method.Please find attached patch that fixes the issue.
It follows the guidelines of
SearchApiQuery
to implement the__toString
method, simply adding the name of every index at the begginning ot the output.Comment #4
bmunslow CreditAttribution: bmunslow at SOCIETAT PORTAL DE LLEIDA S.L commentedComment #5
grossmann CreditAttribution: grossmann commentedHi, i tested the patch and it works for me. But I didn't review the code that much. Can you show me where you found this:
so I can take a closer look on the code.
Comment #6
bmunslow CreditAttribution: bmunslow at SOCIETAT PORTAL DE LLEIDA S.L commented@grossman:
Sure, take a look at the
search_api
module, fileincludes/query.inc
line 841Comment #7
grossmann CreditAttribution: grossmann commented@bmunslow: Thanks for the info. I now looked into it and it seems pretty ok to me. So I set this to be RTBC.
Comment #8
zuernBernhard CreditAttribution: zuernBernhard at UEBERBIT GmbH commentedWorks here too, please commit.
Comment #9
drunken monkeyHas been fixed for half a year, please use the module's dev version.
(In general, please first try that before reporting an issue!)
Comment #10
grossmann CreditAttribution: grossmann commentedUnbelievable how stupid we are *smack head*. Of course we should have tried this first.
@drunken monkey: Thanks for clearing that up. Hopefully I remember this comment on my next problem ;-)