Jesse Graupmann
Forum Replies Created
-
This has been resolved with Relevanssi 3.5.2
That’s it! Thanks for all your effort and a great plugin. Much appreciated.
Sorry, I’m still see that previous error, Line: 149 & 150 in Stable tag: 3.5.1
Thanks!
That seems to work. A bit of slow queries at first but after rebuilding it seems to be working. When can we expect a production update?
Undefined variable: term_id
wp-content/plugins/relevanssi/lib/search.php:149
wp-content/plugins/relevanssi/lib/search.php:150Forum: Plugins
In reply to: [Publish To Apple News] Multiple Errors on Custom Post Type Edit ScreenUpdate:
This also extends to normal posts as well.
Can you also expand on this description?
(Choose the post types that are eligible for publishing to Apple News.)
Which types would be eligible if the majority of my site is made of CPT?
Thanks Mikko & Chouby. I’ll mark this resolved after
term_taxonomy_idsupport is added to Relevanssi.It’s a great plugin, it just needs to support
term_taxonomy_id.Thanks for your help again Chouby!
I tried fixing the
termsusing;// in functions.php add_filter('relevanssi_modify_wp_query', 'rlv_polylang_fix'); function rlv_polylang_fix($q) { $tq = $q->query_vars['tax_query']; foreach($tq as $inx => $t){ if( isset($t['terms']) && is_scalar($t['terms']) ){ // fix to an array $q->query_vars['tax_query'][$inx]['terms'] = array($t['terms']); // try to set in term_id if(!isset($t['term_id'])){ $q->query_vars['tax_query'][$inx]['term_id'] = array($t['terms']); } } } return $q; }Nada.
But after I set up some debugging, your logic doesn’t support
term_taxonomy_id. If you add this, it’ll work:// in lib/search.php if ( $row['field'] == 'id' || $row['field'] == 'term_id' ) { //.. } elseif ( $row['field'] == 'term_taxonomy_id' && isset($row['terms'])) { $id = $row['terms']; if( is_array($id) ){ $term_id = $id; } elseif(is_scalar($id)){ $term_id = array($id); } }Sorry, that did not work. Here are the rows passing into the function.
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 )It appears this is a pantheon.io specific issue. Resolved with a plugin they manage.
The languages work just fine in Polylang when you run the form through ‘get_search_form’.
$form = apply_filters( 'get_search_form', $form );The ‘rlv_polylang_fix’ does not change anything. It does appear that the errors only show in the default language, in my case, English.
Yea, absolutely not an option for me on black-buddha.com. What’s the best course of action here?
I am using ACF + Polylang, not sure if that helps.
array(1) { [0]=> array(4) { ["taxonomy"]=> string(8) "language" ["field"]=> string(16) "term_taxonomy_id" ["terms"]=> int(81) ["operator"]=> string(2) "IN" } } object(WP_Tax_Query)#365 (6) { ["queries"]=> array(1) { [0]=> array(5) { ["taxonomy"]=> string(8) "language" ["terms"]=> array(1) { [0]=> int(81) } ["field"]=> string(16) "term_taxonomy_id" ["operator"]=> string(2) "IN" ["include_children"]=> bool(true) } } ["relation"]=> string(3) "AND" ["table_aliases":protected]=> array(1) { [0]=> string(21) "wpxyz_term_relationships" } ["queried_terms"]=> array(1) { ["language"]=> array(2) { ["terms"]=> array(1) { [0]=> int(81) } ["field"]=> string(16) "term_taxonomy_id" } } ["primary_table"]=> string(8) "wpxyz_posts" ["primary_id_column"]=> string(2) "ID" }I wasn’t. I just typed in a random string like ‘asdfasdf’ to see a search page. It was a fresh install so not everything was setup.