Forums › Forums › Search & Filter Pro › Console error: Uncaught TypeError: Cannot read property 'split' of undefined
- This topic has 11 replies, 2 voices, and was last updated 5 years, 8 months ago by Anonymous.
-
Anonymous(Private) February 21, 2019 at 1:11 pm #202855
Dear Trevor,
I have a weird case that I can’t seem to fix. When Ajax is enabled, I’m unable to click on my buttons to go to the detailed page. Instead I see the following error in the console. When ajax is turned of, I can click the buttons again to go to the detailed page.
I hope you have any idea what might be causing it.
Uncaught TypeError: Cannot read property 'split' of undefined at HTMLFormElement.getQueryParamFromURL (search-filter-build.min.js?ver=2.4.6:2) at HTMLFormElement.getPagedFromURL (search-filter-build.min.js?ver=2.4.6:2) at HTMLDivElement.<anonymous> (search-filter-build.min.js?ver=2.4.6:2) at HTMLDocument.dispatch (jquery.js?ver=1.12.4:3) at HTMLDocument.r.handle (jquery.js?ver=1.12.4:3)
Trevor(Private) February 27, 2019 at 11:09 am #203465See this post:
https://support.searchandfilter.com/forums/topic/formatting-functionality-issues/page/2/#post-184167
Unless I have misunderstood one of your earlier replies?
Anonymous(Private) February 27, 2019 at 12:11 pm #203482Hi Trevor,
My first post maybe wasn’t that clear. I apologize. We’re using a custom WP query for this page to show all the activities (activiteiten). When clicking the ‘bekijk activiteit’ button on the activiteiten page it show an error in console from Google Chrome devtools (error in first post) and we can’t figure out what’s causing it.
The button is working (forwarding to the detail page) when we turn off the ajax setting in the S&F settings.
This is our custom post type:
<?php $atts = shortcode_atts( [ 'number' => -1, 'orderby' => 'menu_order', 'category' => '', ], $atts, 'alle_activiteiten' ); $numberposts = $atts['number']; $order_by = $atts['orderby']; $category = $atts['category']; // args. $args = array( 'post_type' => 'activiteit', // CPT slug. 'posts_per_page' => $numberposts, 'post_status' => 'publish', 'orderby' => $order_by, 'order' => 'ASC', 'search_filter_id' => 125, 'show' => 'results', /*'tax_query' => array( array( 'taxonomy' => 'my_category_slug', 'field' => 'slug', 'terms' => $category, 'operator' => 'AND', ), ),*/ ); $activiteiten = new WP_Query( $args ); if ( $activiteiten->have_posts() ) : while ( $activiteiten->have_posts() ) : $activiteiten->the_post(); ?> <div class="alleKamersBlok bmargin"> <div class="alleKamersImage"> <?php the_post_thumbnail('medium-large'); ?> </div> <div class="alleKamersText activiteitenText"> <h2><a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2> <h4 class="cat"><?php echo get_field("activiteiten_soort_activiteit"); ?></h4> <p><?php echo get_the_content(); ?></p> <div class="buttonContainer"><a itemprop="url" href="<?php the_permalink(); ?>" target="_self" class="qbutton default" style="">Bekijk activiteit</a></div> </div> </div> <?php endwhile; wp_reset_postdata(); else : _e( 'Woops! Niks gevonden.', 'flux' ); endif; ?>
Hope this clears things up.
Anonymous(Private) February 28, 2019 at 10:30 am #203585Hi Trevor,
As always, the ‘bug’ is found and of course our own fault. We filled in a class for ‘Ajax Pagination’ on the display results section but we don’t make use of it. Probably this caused some kind of overlay that prevented it from working properly.
-
AuthorPosts