V20 – Pagination and Results partially loading.
- ekimunalParticipant5 years, 1 month ago #13941
Hello,
We have multiple sites running on the version 20 yet we can not currently update to current version.
It seems like search function and results are not working properly. This was implemented by another developer and I am trying to take over and fix issues.
What should I investigate? Where to start?
Couldn’t load results with default sort, it works after sorting is changed.
Wont Work:
/?s=police
/?s=police&wpsolr_sort=sort_by_date_desc
/page/2/?s=policeDoes Work:
/?s=police&wpsolr_sort=sort_by_relevancy_descOnce set to relevancy it starts working including paging, but with dates it is not working.
What might be the issue?
wpsolrKeymaster5 years, 1 month ago #13943What do you see in debug.log?
It could be that the sort fields are not indexed. Try to select them in screen 2.2, then add them to the sort fields in 2.4. Also add the WPSOLR sort widget to your search page: that will show you how to generate the sort urls for your fields.
ekimunalParticipant5 years, 1 month ago #13985My bad, php error log has nothing but apache logs has lots of this:
[Tue Sep 10 16:28:07 2019] [error] [client 127.0.0.1] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use ‘LimitInternalRecursion’ to increase the limit if necessary. Use ‘LogLevel debug’ to get a backtrace., referer: /page/5/?s=police&wpsolr_sort=sort_by_relevancy_desc
[Tue Sep 10 16:28:07 2019] [error] [client 127.0.0.1] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use ‘LimitInternalRecursion’ to increase the limit if necessary. Use ‘LogLevel debug’ to get a backtrace., referer: /page/5/?s=police&wpsolr_sort=sort_by_relevancy_descwpsolrKeymaster5 years, 1 month ago #13988Nothing in debug.log with https://codex.wordpress.org/Debugging_in_WordPress ?
ekimunalParticipant5 years, 1 month ago #13989Yeah sorry, nothing related to Solr in the debug.log or apache logs.
try {
if ( ” === get_search_query() ) {
throw new Exception( ‘No query specified.’ );
}
$localization_options = OptionLocalization::get_options();
$final_result = WPSOLR_Service_Container::get_solr_client()->display_results( WPSOLR_Service_Container::get_query() );$sorts = WPSOLR_Data_Sort::get_data(
WPSOLR_Service_Container::getOption()->get_sortby_items_as_array(),
WPSOLR_Service_Container::getOption()->get_sortby_items_labels(),
WPSOLR_Service_Container::get_query()->get_wpsolr_sort(),
$localization_options
);
$query = WPSOLR_Service_Container::get_query();
$query->get_posts();} catch ( Exception $e ) {
$sorts = array();
$facets = array();// On failure, we revert to an empty WP_Query which would have no results.
$query = new WP_Query();
}Here is the custom modifications we use with WPSOLR
You must be logged in to reply to this topic.