• Resolved InfoGiants

    (@lpkapil)


    If you don’t add any sorting option from solr_options > sort options in admin wpsolr plugin, it will throw error in json parsing in :

    autocomplete_solr.js

    Error in parsing: data = JSON.parse(data1);

    More debugging what in data that is after console log:

    Undefined index: sort_opt in <b>/var/www/html/wp/wp-content/plugins/wpsolr-search-engine/ajax_solr_services.php</b> on line <b>308</b><br /

    That means if no “sort_opt” solr sorting option is selected that error occurs. Please add check for empty solr sort_option and other fields in file:

    ajax_solr_services.php in line no: 308 as here direct post variables taken without empty cehck.

    $query = $_POST[‘query’];
    $opt = $_POST[‘opts’];
    $num = $_POST[‘page_no’];
    $sort = $_POST[‘sort_opt’];

    $solr = WPSolrSearchSolrClient::create_from_default_index_indice();
    $final_result = $solr->get_search_results( $query, $opt, $num, $sort );

    Does that make sense ?? ??

    https://www.ads-software.com/plugins/wpsolr-search-engine/

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘sort_option No Empty check error in pagination on switcing next page’ is closed to new replies.