Forums Forums Search & Filter Pro Search results and URL not updating

Viewing 6 posts - 1 through 6 (of 6 total)
  • Anonymous
    #139211

    I’m using Search & Filter Pro and I’ve run in to a problem

    So here is my search page

    https://love-glamping.co.uk/?sfid=37085

    If I enter a search term say ‘Brighton’ and hit enter you’ll see that nothing happens – the posts are not updated and neither is the URL – I would expect the URL to change to https://love-glamping.co.uk/?sfid=37085&_sf_s=brighton and interestingly if you update the URL manually that does work – the search results are now updated.

    So what could be causing that? I’m a bit lost at trying to figure out a reason to why that would be happening – if someone can point me in the right direction or offer some advice on this one I’d be very grateful!

    Regards,
    Neil

    Anonymous
    #139213

    So I’ve been trying to strip this back to be really basic and as simple as possible so through the Search & Filter documentation I have created the simple search filter test page here

    https://love-glamping.co.uk/search-filter-test-page/

    I’ve getting a message ‘This Search Form has not been configured to use a shortcode’ so maybe that could be my issue – however search the forum I can’t find a solution to this issue yet .. I’ll keep researching and see what I can find

    Regards,
    Neil

    Anonymous
    #139217

    And here’s my search.php page with a custom query – maybe this is simply not picking up my search terms but I can’t see anything I’ve done wrong

    <?php
                            $args = array('post_type' => 'post');
                            $args['search_filter_id'] = 37085;
                            $SFquery = new WP_Query($args); 
                        ?>
    
                        <?php if($SFquery->have_posts()) :  ?>
    
                            <header class="page-header">
    
                                <h1 class="page-title"><?php printf( __( 'Search Results for: %s', 'twentytwelve' ), '<span>' . get_search_query() . '</span>' ); ?></h1>
    
                            </header>
    
                            <?php /* Start the Loop */ ?>
    
                            <?php while ( $SFquery->have_posts() ) : $SFquery->the_post(); ?>
    
                                <article>
    
                                    <?php get_template_part( 'content', 'post-list-main' ); ?>
    
                                </article>
    
                            <?php endwhile; ?>
    Trevor
    #139234

    So, if you open the inspector in your browser and look at the console, you will see a javascript error, and that is causing Ajax to fail. You code is combined/minified so I cannot see where the error is coming from. The page should work if you disable Ajax in the form settings.

    Anonymous
    #139242

    I have resolved the issue … kind of

    It wasn’t the Ajax, I turned this off but the bug remained however your comment on the javascript error pointed me in the right direction – I went to switch off my script optimiser (a plugin called ‘
    JS & CSS Script Optimizer’ which has been really reliable and useful) so that I could discover what the issue was and turning this off actually fixed the problem – I’m not sure what the conflict was but that’ll be for me to figure out later

    Thank you for you time and support – as always extreamly helpful!

    N

    Trevor
    #139244

    Ah, my guess is that one of the individual scripts does not end with a ; and so when combined causes an error. Adding that in to the end of that script would fix that.

Viewing 6 posts - 1 through 6 (of 6 total)