Viewing 20 posts - 1 through 20 (of 20 total)
  • Author
    Posts
  • #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/eyU7Fd

    This 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 statement

    The 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

    #957993

    Hey 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,
    Ismael

    #958053

    Hello 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

    #959020

    Hi 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,
    Victoria

    #959088

    Hello 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

    #959623

    Hi 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,
    Victoria

    #962039

    Hello 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

    #962955

    Hi,

    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,
    Ismael

    #962958

    Hi,

    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,
    Ismael

    #962982

    Hello Ismael,

    Glad you could reproduce the issue! The filter plugin is FacetWP.

    Greets Jeen

    #963903

    Hi,

    Have you tried follow up with the plugin developers regarding it?

    Best regards,
    Basilis

    #964299

    Hello 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

    #964330

    Hello 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

    #964645

    Hi,

    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,
    Ismael

    #964657

    Hello 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

    #964860

    Hi!

    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!
    Ismael

    #964889

    Hello 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

    #965284

    Hi,

    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,
    Ismael

    #965290

    Hello 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

    #966039

    Hi!

    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

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