Closed (fixed)
Project:
Search API
Version:
7.x-1.26
Component:
Plugins
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
18 Mar 2019 at 10:12 UTC
Updated:
9 Dec 2019 at 17:50 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
johan den hollander commentedComment #3
johan den hollander commentedComment #4
ecvandenberg commentedSame here on a website on PHP 7.1.26
And on another site on PHP 5.6.40
Config:
drupal 7.65
Search API 7.x-1.26
Search API Database Search 7.x-1.7
The excerpt function seems to work fine though...
Comment #5
rclemings commentedPHP 7.1.27
Drupal 7.65
Search API 7.x-1.26
Line 363 in v1.26:
if (!$this->options['highlight_partial']) {
Line 363 in v1.25:
if (empty($this->options['highlight_partial'])) {
Changing it back to what it was in v1.25 eliminates the error for me, but I'm reluctant to do a patch without understanding why the change was made in the first place.
This looks like the commit/issue where it happened:
https://cgit.drupalcode.org/search_api/commit/?id=27b6cbb
https://www.drupal.org/node/2990940
Comment #6
rclemings commentedThis seems to work as well and may be more in line with what the v1.26 change intended:
if (!isset($this->options['highlight_partial'])) {
Comment #7
drunken monkeyThanks a lot for reporting this! The problem seems to stem from backporting a patch from D8 – while plugin options there are centrally defined and therefore always have a default value, we do have to use
empty()in D7, of course.Patch attached, please test/review!
PS: It seems you (like many others – it's really easy to misinterpret) are confused by the "Issue tags" field. As the guidelines state, they aren't meant for free text tags related to the issue, but only for specific categorization purposes, usually by module maintainers.
So, if you aren't sure your current usage is correct, please just leave the field empty.
PPS: “Needs work“ status only applies if there is already a patch. Otherwise, “Active“ is the correct status.
Comment #8
rclemings commentedPatch works perfectly, thanks.
I'm not sure to whom your other comments were directed but I think the issue tags and for certain the "needs work" came from the OP, not me.
Comment #9
johan den hollander commentedYeah, patch works. I suppose the other comments were directed to me. Thank you for explaining that to me @drunken Monkey.
Comment #10
kreatil commentedThe Patch fixes the error for me.
Comment #12
drunken monkeyGood to hear, thanks a lot for reporting back, everyone!
Committed.
rclemings: Yes, the P(P)S was of course directed at Johan, not you.
Comment #14
thetaPCI noticed that the commit was pushed to the dev branch. Please, push it to the next update (7.x-1.2x) since the Panopoly profile is currently using Search API 7.x-1.26. This causes the error to still appear.
The patch works great on 7.x-1.26. Thank you.