sf_edit_query_args does not change the search

Forums › Forums › Search & Filter Pro › sf_edit_query_args does not change the search

Viewing 8 posts – 1 through 8 (of 8 total)
  • Anonymous
    #125881

    Hi there I recently followed the example https://support.searchandfilter.com/forums/topic/null-fields-not-returning-results/ as I have an identical issue.

    I used this code pretty much verbatim and a print_r shows all the range fields have been removed from $sf_current_query, HOWEVER the search still behaves as though they are still there and is returning 0 results. If I manually edit the search URL it works fine.

    How do I make sf_edit_query_args actually change the search?

    Thanks,

    Caroline

    Trevor
    #125885

    The first thing to do is, in the code, before you make a change, use the PHP print_r function to output the query array to the screen, and that, after you modify it, do the same again, and compare the arrays. Like this:

    echo '<pre>',print_r($sf_current_query,true),'</pre>';

    I have not actually used the sf_edit_query_args function myself.

    Anonymous
    #125895

    Yes I did that and the array is as it should be with the offending variables removed. However the search functions as if the variables are still there.

    Trevor
    #125897
    This reply has been marked as private.
    Anonymous
    #125899
    This reply has been marked as private.
    Anonymous
    #125902
    This reply has been marked as private.
    Anonymous
    #125917
    This reply has been marked as private.
    Anonymous
    #125919
    This reply has been marked as private.
Viewing 8 posts – 1 through 8 (of 8 total)
Search & Filter Support
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

We also use cookies to store items in your cart as well as allowing your to login on the site.

You can adjust all of your cookie settings by navigating the tabs on the left hand side.

By continuing to use this site, you also agree to our Privacy Policy.