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)