[Resolved] WP Testimonial & Foobox Lightbox Plugin Conflict

Home Forums Support [Resolved] WP Testimonial & Foobox Lightbox Plugin Conflict

Home Forums Support WP Testimonial & Foobox Lightbox Plugin Conflict

  • This topic has 8 replies, 2 voices, and was last updated 6 years ago by Leo.
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #556366
    Andy

    Hi,

    I’m not sure this is entirely a problem with GP but when switching to the Twenty Seventeen theme the bug goes away.

    Basically I recently updated the Foobox Image Lightbox plugin (https://wordpress.org/plugins/foobox-image-lightbox/) on a GP site from version 1.2.34 to 2.5.2. Unfortunately doing so breaks another plugin I’m using on the home page called WP Testimonials with rotator widget (https://wordpress.org/plugins/wp-testimonial-with-widget/) and leaves a very tall blank area.
    I’ve been using these plugins together with no problems for the past 14 months so the bug has only come about since updating the Foobox plugin to the latest version.

    Unfortunately I’ve not had much luck getting support from the plugin authors. The WP Testimonial plugin developer’s say it’s a JS conflict and only the FooBox developer’s can alter their code to fix this, although they are still currently looking for a solution. Unfortunately I’ve had no response at all from the FooBox developer’s.

    However, I then tried switching the theme to Twenty Seventeen and the WP Testimonial slider displayed fine. So this would suggest there is a conflict with GP too.

    I have copied the site over to a password protected staging area so you can compare it with the live site which uses the older version of the Foobox plugin and WP testimonials is still working, I’ve tried to include the login details in the ‘Your website URL’ field when submitting this post.

    Any help much appreciated.

    #556590
    Leo
    Staff
    Customer Support

    Hi there,

    I see a console error jQuery is not defined on your home page.

    This is likely because the plugin requires jQuery but isn’t loading it for itself.

    Should be the same issue here: https://generatepress.com/forums/topic/shortcode-does-not-show-in-front-end/#post-475755

    Let me know if this helps.

    #556656
    Andy

    Thanks Leo. I will try this although I believe adding that code to the GP Header Hook will add the jquery script to every page. I’d like to keep the site running as quick as possible. Could I use a conditional statement to only load jquery on the homepage?.

    Also I’ve just had a response from the Foobox developer so he is also looking into it so hopefully I won’t need to add the extra code.
    I do think it’s odd that an update for one plugin has stopped another plugin loading jquery.

    #556712
    Leo
    Staff
    Customer Support

    You can use conditional tag for that: https://docs.generatepress.com/article/using-hooks-conditional-tags/#static-front-page

    Best to wait for the answer from the plugin author though.

    #558370
    Andy

    ok just an update here guys. The plugin developer noticed the issue remained even when the Foobox plugin was deactivated.
    Therefore, I think the actual cause was when GP changed to vanilla JS in one of its recent updates.

    Adding the following to the wp_head Hook fixes the issue:

    <?php if ( is_front_page() ) : ?>
       <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
    <?php endif; ?>

    However, from what I gather from Leo/Tom’s replies/posts the plugin author should make jquery a requirement in their script, so it’s something I will mention to them.

    It’s a bit of a ‘hacky’ solution at present so hope they can release an update with a proper fix.

    #558549
    Leo
    Staff
    Customer Support

    Awesome.

    Thanks for sharing!

    #558870
    Andy

    Actually I don’t think this issue is being caused by Foobox. If I activate the plugin and switch to the Twenty Seventeen theme then the issue goes away (without the need for loading jquery on the homepage).

    So I would appreciate any further help.

    #559144
    Andy

    The WP Testimonials plugin developer say they are going to release an update which will bring Jquery into the header when required.

    So hopefully that will be a better fix.

    #559158
    Leo
    Staff
    Customer Support

    I believe twenty seventeen is loading jQuery by default 🙂

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