dcooney on "[Plugin: Ajax Load More - Infinite Scroll] Latest Update jQuery Error"

ساخت وبلاگ

Hi,

Since updating to the latest version of this plugin, I am receiving the following jQuery error:

SyntaxError: Unexpected token <(…) ajax-load-more.min.js?ver=2.10.0.1:926

Any ideas why this may be occurring?

I am going to revert back to the previous version in the meantime.

FYI: I am definitely loading wp_footer and am calling the shortcode using do_shortcode()

Cheers,

J

https://wordpress.org/plugins/ajax-load-more/

Another user reported this as well.
I can't locate the issue, is there anyway you can share a link or test without the .min version?

Unfortunately it's occurring on a local dev site, so can't share a link.

Is there an option to disable files being minified? Or do I need to dequeue the .min then re-add the standard version?

Line 261 of ajax-load-more.php you can comment out the .min version and uncomment the standard.

Are you using the paging add-on? I think I found a possible issue with the retu type.

Tried loading the non .min version of the js file and am still getting the error.

And nope I'm not using any of the add-ons.

Must be something in the formatting of the json.
Any chance you can share your repeater template and shortcode?

Sure.

Repeater Template:

<div class="col-sm-6 col-md-6 col-lg-4 ajax-item"<?php if (! has_post_thumbnail() ) { echo ' class="no-img"'; } ?>> <div class="ajax-item-border"> <?php global $post; ?> <?php if ( has_post_thumbnail() ) { ?> <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"> <?php the_post_thumbnail('large'); ?> </a> <?php } ?> <h3> <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"> <?php the_title(); ?> </a> </h3> <?php $term_list = wp_get_post_terms($post->ID, 'portfolio-category', array("fields" => "all")); ?> <p class="portfolio-cat <?php echo $term_list[0]->slug ; ?>"> <a href="<?= esc_url(home_url('/')); ?>portfolio-category/<?php echo $term_list[0]->slug ; ?>"> <?php echo $term_list[0]->name ; ?> </a> </p> <?php the_excerpt(); ?> </div>
</div>

Shortcode:

<?php echo do_shortcode('[ajax_load_more post_type="portfolio" taxonomy="portfolio-category" taxonomy_operator="IN" posts_per_page="15" scroll="false" transition="fade" images_loaded="true" button_label="Load More" button_loading_label="Loading..." container_type="div" css_classes="portfolio-items"]'); ?>

Thanks,
I was able to reproduce this exact error in chrome.

In firefox the issue was apparent in the response that there was a fatal error.

Can you test in Firefox, and view the response?

WordPress ...
ما را در سایت WordPress دنبال می کنید

برچسب : نویسنده : استخدام کار wpss بازدید : 45 تاريخ : سه شنبه 24 فروردين 1395 ساعت: 10:35