relevanssi/lib/search.php:135 – Notice: Undefined variable: term_id
-
I’m getting this error when searching only the default language using Relevanssi
Notice: Undefined variable: term_id Location: wp-content/plugins/relevanssi/lib/search.php:135 Call Stack: relevanssi_search() relevanssi_do_query() relevanssi_query() apply_filters_ref_array('the_posts') WP_Query->get_posts() WP_Query->query() WP->query_posts() WP->main() wp() Component: Plugin: relevanssi
I brought up the issue on Relvanssi’s support forum, but even with a proposed fix I get this response from the author:
Relevanssi isn’t supposed to support term_taxonomy_id, because according to WordPress documentation, that’s not an option. Legal values are term_id, name and slug.
Also, Relevanssi already handles the Polylang support elsewhere, so this taxonomy parameter is not even needed.
The best solution would be to clear out the taxonomy parameter so that Relevanssi doesn’t see it. Other way to handle it would be to modify the taxonomy query so that it’s passing a slug (like it’s doing for Chinese in your code) or a term_id.
Do you think this an issue w/Polylang or Relevanssi? I can mute the error with a little extra check but the author doesn’t want to modify his code based on the reasons above.
Thoughts?
English
=> Array ( [taxonomy] => language [field] => term_taxonomy_id [terms] => 81 [operator] => IN )
Chinese
=> Array ( [taxonomy] => language [terms] => Array ( [0] => zh_tw ) [field] => slug [operator] => IN [include_children] => 1 )
- The topic ‘relevanssi/lib/search.php:135 – Notice: Undefined variable: term_id’ is closed to new replies.