This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

ASP_Query problem with 4.24.2

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #40774
    ManuManu
    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 3 years, 5 months ago by ManuManu.
    • This topic was modified 3 years, 5 months ago by ManuManu.
    • This topic was modified 3 years, 5 months ago by ManuManu.
    • This topic was modified 3 years, 5 months ago by ManuManu.
    #40789
    Ernest MarcinkoErnest 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.

    #40806
    ManuManu
    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,

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘Ajax Search Pro for WordPress’ is closed to new topics and replies.