ASP_Query problem with 4.24.2

This topic contains 2 replies, has 2 voices, and was last updated by Manu Manu 1 year, 3 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #40774
    Manu
    Manu
    Participant

    Hi Ernest,

    I’ve recently update from 4.21.3 to 4.24.2 and facing a problem with ASP_Query.

    $search_args_array['search'] = $search;
    $search_args = array(
      "s" => $search,
      "_ajax_search" => false,
      "post_type" => array('recipe'),
      "search_type" => array('cpt','taxonomies'),
      posts_per_page' => 12
    );
    $asp_query = new ASP_Query($search_args, 6, $search_args_array);

    Since the update, I have only taxonomies results in the response.
    With 4.21.3 i was having both taxonomies and post.
    (The config of the search instance “6” is the same on both version).

    Do you have any hint to make it work on the last version ?

    Thank you

    • This topic was modified 1 year, 3 months ago by Manu Manu.
    • This topic was modified 1 year, 3 months ago by Manu Manu.
    • This topic was modified 1 year, 3 months ago by Manu Manu.
    • This topic was modified 1 year, 3 months ago by Manu Manu.
    #40789
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    That is a very large jump of version, I suspect you may have a problem in the actual search configuration instead. 4.21.3 is like 30 releases behind 4.24.2, so check the settings, save the options again to refresh the database and try if the regular search gives any results.
    If not, you should create a new search instance just to make sure the data is not corrupted.

    In your snippet the $search_args_array argument is also likely a source of a problem, as it is not apparent what it contains. Try without that argument to see if it changes anything.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #40806
    Manu
    Manu
    Participant

    Hello,

    Thank you for your answer, you are right it a settings issue, it’s working fine on a clean install.
    I will create a new instance if i can’t find a way to erase the problematic setting on the current one.

    Oh and just another question, what is the best way to use the function “new ASP_Query();” anywhere in our wordpress theme ?
    Intelephense is telling me since the update that it’s now undefined.

    Do i need to add some kind of declaration somewhere ?

    Thanks again,

    Attachments:
    You must be logged in to view attached files.
Viewing 3 posts - 1 through 3 (of 3 total)

The forum ‘Ajax Search Pro for WordPress’ is closed to new topics and replies.