- This topic has 8 replies, 2 voices, and was last updated 3 years ago by Leo.
April 21, 2018 at 4:20 am #556366Andy
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.GeneratePress 2.0.2GP Premium 1.6.2April 21, 2018 at 9:16 am #556590LeoStaffCustomer Support
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.April 21, 2018 at 10:33 am #556656Andy
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.April 21, 2018 at 12:13 pm #556712LeoStaffCustomer 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.April 23, 2018 at 1:02 pm #558370Andy
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.April 23, 2018 at 6:30 pm #558549LeoStaffCustomer SupportApril 24, 2018 at 4:02 am #558870Andy
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.April 24, 2018 at 8:06 am #559144Andy
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.April 24, 2018 at 8:25 am #559158
- You must be logged in to reply to this topic.