Looking for support? You can access the support system via your account.
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, 1 month ago by Stijn De Witte.
-
Stijn De Witte(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 Moderator(Private) February 21, 2019 at 5:17 pm #202895Are you using our WPBakery Page Builder addon plugin? If so, what version of Page Builder are you using, and which version of our addon is it?
Stijn De Witte(Private) February 27, 2019 at 9:49 am #203436Hi Trevor,
Sorry for the delayed reply. We are indeed using that plugin with version 5.6 and for S&F Pro we use 2.4.6.
I hope that helps!
Kind regards,
DirkTrevor Moderator(Private) February 27, 2019 at 10:04 am #203440Hi
I understand you are using Page Builder v5.6, but what version of OUR addon plugin are you using?
It should be 0.1.1
Stijn De Witte(Private) February 27, 2019 at 11:03 am #203459Hi Trevor,
Thank you for your quick reply. I’m not sure what addon you mean. I didn’t even know there was an addon for S&F. Where can I find this and what can I use it for?
Thank you!
Trevor Moderator(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?
Stijn De Witte(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.
Trevor Moderator(Private) February 27, 2019 at 12:17 pm #203485This reply has been marked as private.Stijn De Witte(Private) February 27, 2019 at 12:42 pm #203489This reply has been marked as private.Stijn De Witte(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
The topic ‘Console error: Uncaught TypeError: Cannot read property 'split' of undefined’ is closed to new replies.