-
AuthorPosts
-
May 15, 2018 at 12:31 pm #956940
Hello,
Please take a look at this page:
At first, the page load and you can see a white space between every image. This white space goes away after 1 or 2 seconds.
When I use a filter on the left side, the white space beneath the images stays visible.Please see this screenshot as an example:
https://ibb.co/eyU7FdThis is not the normal behavior. The white spaces should dissapear. Another problem is that the pictures of the houses don’t come in a lightbox.
My conclusion is that the javascript doesn’t load fully, I can also see an javascript error present:
unreachable code after return statementThe strange thing is that after I use the filter and the problem apears, then I hit the URL again and the page loads again,
the white space dissapears and the lightbox starts to function.The javascript error is a Google-js error. I believe that it’s maybe in the Google Analytics box and the way it loads?
Can you please take a look.
Greets Jeen
May 17, 2018 at 8:22 am #957993Hey Groeier!,
Thank you for using Enfold.
The script takes a while to kick in. Please try this css code to get rid of the white space below the items.
.page-id-11286 #gridselector .grid-entry { max-height: 248px; }
Best regards,
IsmaelMay 17, 2018 at 9:47 am #958053Hello Ismael,
Thanks for the code. It works on most pictures.
But the biggest problem is that because the script doesn’t load fully, the lightbox doesn’t work.
The first time you open the page it works perfect.
The second time, the hyperlinks only goes to a external page/tab because the lightbox isn’t loaded.Can you please take a look why the script isn’t loaded fully? Like I said; it looks like a Google thing.
I disabled all the plugins but the problem keeps existing…Greets Jeen
May 19, 2018 at 11:18 am #959020Hi Jeen,
It works fine on my end, reloaded the page a few times and the lightbox opens.
Could you please clear the cache, check again and get back to us.
Best regards,
VictoriaMay 19, 2018 at 3:11 pm #959088Hello Victoria,
Thanks for checking! I also can get it to work when I reload a few times.
I also cleared the cache but that doesn’t change a thing. The solution seems to be to reload the page.Maybe you can check it again after reload, but than close the browser and reopen the page.
On my end, I have to reload every time I open the page the first time and everytime I use a filter option in the left side.
I can’t expect my users to reload everytime:)Gr. Jeen
May 21, 2018 at 10:27 am #959623Hi Jeen,
What I meant is that it worked the first time and still works on the first load on my end. I reloaded the page to see it breaks after reload. The small video is below.
Which browser/OS are you using?
Best regards,
VictoriaMay 25, 2018 at 11:36 am #962039Hello Victoria,
Thanks for the movie!
Can you please use the filters at the left side and than check it again?Because the first load works on my end as well but when I use the filters I can’t use the lightbox anymore.
The url’s are going directly to the image-url.I updated the version to Enfold 4.4
Greets Jeen
May 28, 2018 at 8:08 am #962955Hi,
I can reproduce the issue only when I intentionally click the images as fast as I could once the document loaded. The actual users or visitors will probably take a few seconds to decide what or where to click and the scripts should be fully loaded that time. To make sure that the scripts load fast enough, please make use of the theme’s Performance features and install a cache plugin. You may also need to optimize the images for faster page speed. You’ll find plugin recommendations in the Enfold > Performance panel.Best regards,
IsmaelMay 28, 2018 at 8:14 am #962958Hi,
UPDATE: Please ignore my first reply. Yes, I can reproduce the issue when I clicked on the filters. What is the name of the filter plugin?
Best regards,
IsmaelMay 28, 2018 at 8:51 am #962982Hello Ismael,
Glad you could reproduce the issue! The filter plugin is FacetWP.
Greets Jeen
May 29, 2018 at 7:46 pm #963903Hi,
Have you tried follow up with the plugin developers regarding it?
Best regards,
BasilisMay 30, 2018 at 3:07 pm #964299Hello Basilis,
I have, but no response so far… but to be honest, I think it’s a Javascript error because of the Google Analytics implementation of the theme.
Therefore I send you guys a support request.Greets Jeen
May 30, 2018 at 3:51 pm #964330Hello Basilis,
I have a response from FacetWP:
FacetWP is ajax-based, and it works by replacing all the HTML (DOM elements) within the facetwp-template container element. The side-effect is that, as the old HTML is removed, all their event listeners are destroyed as well.
Long story short, I think you’ll need to find whichever code is responsible for handling the lightbox, and re-trigger it within a facetwp-loaded event.
$(document).on(‘facetwp-loaded’, function() {
if (FWP.loaded) { // skip pageload
// TODO re-trigger the lightbox
}
});Can you maybe tell me how to alter the above function so the lightbox will get triggered?
Gr. Jeen
May 31, 2018 at 7:15 am #964645Hi,
Thanks for the update.
You can try this script in the functions.php file.
add_action('wp_footer', 'ava_custom_script'); function ava_custom_script(){ ?> <script type="text/javascript"> $(document).on('facetwp-loaded', function() { if($.fn.avia_activate_lightbox){ $('body').avia_activate_lightbox(); } }); </script> <?php }
You may need to re-save the theme options to regenerate the scripts and stylesheets.
Best regards,
IsmaelMay 31, 2018 at 7:50 am #964657Hello Ismael,
Thanks for the provided script! The script is implemented in the footer (i can see this in the source code) but no luck.
Can you please take a look again?:)Greets Jeen
May 31, 2018 at 5:40 pm #964860Hi!
Thanks for the update. Please provide the login details so that we could test the script. Where could we learn more about the “facetwp-loaded” event? Please provide a link to the plugin’s event documentation or reference.
Cheers!
IsmaelMay 31, 2018 at 6:25 pm #964889Hello Ismael,
Of course! I have added the login details in the private box.
The plugin site is:
Documentation can be found here:
And the specific script page here:
Thanks for helping me out!
Greets Jeen
June 1, 2018 at 1:08 pm #965284Hi,
Thanks for the update. We adjusted the script a bit. It works properly now. Please don’t forget to remove the browser cache prior to checking the page.
// https://pastebin.com/uUjHQyEt
Best regards,
IsmaelJune 1, 2018 at 1:16 pm #965290Hello Ismael,
Thank you very much. I’m very glad you could find the solution and helped me out trough the end!!
Compliments for the whole team for keep trying!Can I make a donation to thank you and your team?
Greets Jeen
June 3, 2018 at 5:28 am #966039Hi!
Glad we could help and thanks for the offer. A quick review of the theme would be nice. :)
// https://themeforest.net/downloads
Best regards,
Ismael -
AuthorPosts
- You must be logged in to reply to this topic.