• Resolved htwinam

    (@htwinam)


    Hi

    We have recently updated one of our client sites to 7.1.2 from 6.2.0.3 (due to a client billing issue, we haven’t updated their plugins for a while). This broke all instances of ALM across the site, with RangeError: Invalid array length showing in the console, probably an ajax error? No items are loaded in the .alm-listing container.

    We’ve rolled back to various versions to see where the break has occurred, and it begins with 7.0.0 (the version straight after 6.2.0.3). I can see some significant code changes in this version, which must be the reason why it’s breaking. We can’t find any specific plugin or JS conflicts, and wondered if you’ve seen this RangeError occur before, if there’s anything we can do to fix?

    We’ve rolled back to 6.2.0.3 for now, but would really like to be able to update as soon as we can.

    Thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Darren Cooney

    (@dcooney)

    @htwinam Not sure what that error would be about, but can you share an example shortcode and Repeater Template that has the issue?

    Thread Starter htwinam

    (@htwinam)

    I’ve mirrored the client site on our staging server, and updated all plugins/theme/WP to the latest versions. I’ve deactivated most plugins on the site (during testing deactivated all – no difference) and have also tested removing all other JS on the site and the error remains. We have ALM successfully installed on a number of other sites without any issues so must be something to do with this setup.

    Is there a way of sending the site URL privately?

    Here are the shortcodes being used on the FAQs page (filter and listing):

    [ajax_load_more_filters id="faq_filters" target="faq_posts"]
    [ajax_load_more id="faq_posts" target="faq_filters" filters="true" filters_url="false" filters_paging="false" post_type="faq" posts_per_page="-1" order="ASC" placeholder="true"]

    This is the template code:

    <?php
    $cat_terms = get_the_terms( get_the_ID(), 'faq_category' );
    $first_term = $cat_terms[0]->name;
    $faqid = get_field('link_to_faq') ? 'id="' . get_field('link_to_faq') . '"' : '';
    ?>

    <div <?php echo $faqid; ?> class="faq-single" data-cat="<?php echo $first_term; ?>">
    <div class="faq-question">
    <h4><?php echo get_the_title(); ?></h4>
    </div>
    <div class="faq-answer">
    <?php the_content(); ?>
    <?php $link = get_field('faq_button'); ?>
    <?php if ( $link ) : ?>
    <?php $link_url = $link['url'];
    $link_title = $link['title'];
    $link_target = $link['target'] ? $link['target'] : '_self'; ?>
    <a class="et_pb_button" href="<?php echo $link_url; ?>" target="<?php echo $link_target; ?>"><?php echo $link_title; ?></a>
    <?php endif; ?>
    </div>
    </div>
    Plugin Author Darren Cooney

    (@dcooney)

    Yes, via the support tab on the website.

    I’ve noticed setting posts_per_page="-1" sometimes causes issues in some environments. I haven’t been able to solve the issue but seems related to the query taking far to long to execute and the JS promise resolving too early.

    Try setting it to an actual value and see if that helps.

    Thread Starter htwinam

    (@htwinam)

    Such an easy fix!

    Yes, that’s sorted it. It’s also resolved a slow loading issue we had that we couldn’t work out.

    Thanks for your help!

    Plugin Author Darren Cooney

    (@dcooney)

    Excellent, thanks for the follow up!

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.