Problem/Motivation
Fetching keys and conjunction now creates a few problems.
Error: Cannot unset string offsets in search_overrides_search_api_solr_query_alter() (line 33 of modules/contrib/search_overrides/search_overrides.module).
Also the keys should be an array. I'm not sure if this used to work in previous versions of the module, I just started using it.
Proposed resolution
Use corrects methods on query to get the keys and conjunction.
$query_keys = explode(' ', $query->getKeys());
$conjunction = $query->getParseMode()->getConjunction();
Remaining tasks
Create patch.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | search_overrides-string_offsets-3145633-4.patch | 900 bytes | mandclu |
Comments
Comment #2
bceyssensComment #3
mandclu commentedIt seems as thought the only time
$query->getKeys()doesn't return an array is when the view's parse mode is set to direct query. Otherwise, it does. So actually, the code needs to be able to handle both. I'll update the patch.Comment #4
mandclu commentedOK the attached works for me in a variety of parse modes. Let me know if this works for you.
Comment #6
mandclu commentedI decided I wanted to get this merged in before starting some other work, so this has been committed. Feel free to reopen the issue if more work is needed on this.