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.
Hi,
As soon as I'm adding 'Indexed Node: Item language' as Filter Criteria, I'm getting the following message:
Notice: Undefined index: options in SearchApiViewsHandlerFilterLanguage->admin_summary() (line 31 of .../modules/search_api/contrib/search_api_views/includes/handler_filter_language.inc).
Any idea how to get ride of it?
Thanks for help.
Comment | File | Size | Author |
---|---|---|---|
#5 | 2187487-5--views_language_filter_admin_summary.patch | 1.28 KB | drunken monkey |
#4 | search_api_views-admin_summary-2187487-4.patch | 1.12 KB | ezeedub |
Comments
Comment #1
stone_d CreditAttribution: stone_d commentedThe same here ... just after updated core and some other modules :/
Any ideas yet?
Thanks in advance for any hint.
Comment #2
Cyclodex CreditAttribution: Cyclodex commentedIt looks like it has to do with the changes from latest version when I compare the
public function admin_summary() {
It looks like
was replaced with:
So when I dpm() the variables and arrays it shows me that there is no option "current" available, but this is the one I have selected in there.
So it looks like there is something not correct with the language field and the way it is getting the options...
$value:
$this->value_options:
The filter criterion: "Indexed Node: Item language" has for me the following options:
- current user's language (current)
- default site language (default)
- language neutral (und)
- English (en)
- German (de)
So I hope this helps to find or fix the issue.
I am not sure what we have to do to get the right values, or why the get_value_options is not getting the right values...
Cheers!
Comment #3
Cyclodex CreditAttribution: Cyclodex commentedNot yet a patch, but here how I fixed it for now, please investigate and fix it if you know how to do it right :)
It looks like the following change will fix the error messages, the question is still, if the definition options are needed or not:
handler_filter_language.inc
This at least solves my error messages and shows the right language "current" selection again.
Comment #4
ezeedub CreditAttribution: ezeedub commentedHere's a patch.
Comment #5
drunken monkeyThanks for reporting this issue and providing a patch!
However, I think the attached one makes the filter a lot simpler and should also resolve the issue pretty well. Please test/review!
Comment #6
IRuslan CreditAttribution: IRuslan commentedPatch works for me.
Comment #7
drunken monkeyGreat to hear, thanks for testing!
Committed.