“Undefined array key” when using relevanssi_orderby filter w post order plugin
-
Relevanssi works as-is with the post ordering plugin I’m using (Real Custom Post Order) but the results are out of order. So I add the following filter as per the docs:
add_filter( 'relevanssi_orderby', function( $orderby ) { $orderby = 'relevance'; return $orderby; } );This fixes the post order, but at the top of the page it outputs:
Warning: Undefined array key -1 in /Users/me/Local Sites/sitename/app/public/wp-content/plugins/relevanssi/lib/sorting.php on line 386 Warning: Undefined array key -1 in /Users/me/Local Sites/sitename/app/public/wp-content/plugins/relevanssi/lib/sorting.php on line 386 Warning: Undefined array key -1 in /Users/me/Local Sites/sitename/app/public/wp-content/plugins/relevanssi/lib/sorting.php on line 386 Warning: Undefined array key -1 in /Users/me/Local Sites/sitename/app/public/wp-content/plugins/relevanssi/lib/sorting.php on line 386 Warning: Undefined array key -1 in /Users/me/Local Sites/sitename/app/public/wp-content/plugins/relevanssi/lib/sorting.php on line 386 Warning: Undefined array key -1 in /Users/me/Local Sites/sitename/app/public/wp-content/plugins/relevanssi/lib/sorting.php on line 386 Warning: Undefined array key -1 in /Users/me/Local Sites/sitename/app/public/wp-content/plugins/relevanssi/lib/sorting.php on line 386 Warning: Undefined array key -1 in /Users/me/Local Sites/sitename/app/public/wp-content/plugins/relevanssi/lib/sorting.php on line 386 Warning: Undefined array key -1 in /Users/me/Local Sites/sitename/app/public/wp-content/plugins/relevanssi/lib/sorting.php on line 386 Warning: Undefined array key -1 in /Users/me/Local Sites/sitename/app/public/wp-content/plugins/relevanssi/lib/sorting.php on line 386 Warning: Undefined array key -1 in /Users/me/Local Sites/sitename/app/public/wp-content/plugins/relevanssi/lib/sorting.php on line 386 Warning: Undefined array key -1 in /Users/me/Local Sites/sitename/app/public/wp-content/plugins/relevanssi/lib/sorting.php on line 386 Warning: Undefined array key -1 in /Users/me/Local Sites/sitename/app/public/wp-content/plugins/relevanssi/lib/sorting.php on line 386 Warning: Undefined array key -1 in /Users/me/Local Sites/sitename/app/public/wp-content/plugins/relevanssi/lib/sorting.php on line 386 Warning: Undefined array key -1 in /Users/me/Local Sites/sitename/app/public/wp-content/plugins/relevanssi/lib/sorting.php on line 386 Warning: Undefined array key -1 in /Users/me/Local Sites/sitename/app/public/wp-content/plugins/relevanssi/lib/sorting.php on line 386If I remove the filter the warnings go away, and if I disable Real Custom Post Order the warnings goes away. I know the issue may be with the post ordering plugin, but I’m wondering if you have any advice here. Thanks!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘“Undefined array key” when using relevanssi_orderby filter w post order plugin’ is closed to new replies.