Forums › Forums › Search & Filter Pro › Search results and URL not updating
- This topic has 5 replies, 2 voices, and was last updated 8 years, 5 months ago by
Trevor.
-
Anonymous(Private) October 30, 2017 at 11:41 am #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,
NeilAnonymous(Private) October 30, 2017 at 12:11 pm #139213So 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,
NeilAnonymous(Private) October 30, 2017 at 12:26 pm #139217And 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(Private) October 30, 2017 at 2:10 pm #139234So, 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(Private) October 30, 2017 at 2:43 pm #139242I 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 laterThank you for you time and support – as always extreamly helpful!
N
-
AuthorPosts