Viewing 22 posts - 1 through 22 (of 22 total)
  • Author
    Posts
  • #1364956

    Hi there,

    We have a bug on the display of the Easy Slider on the top of the Homepage of our site : https://www.edunao.com/

    The bug is only one mobile devices, mainly on iPhones, a warning message appears on the slider that says: “Please set a mobile device fallback image for this video in your wordpress backend”

    Any idea on how to fix this?

    Thank you for your help,

    Olivier

    #1364960

    under the insert area – where you choose your video file – there is the input area for a fallback image
    Thanks for the hint – I never checked that – mostly I don’t set fallback images either.

    #1364984

    Hi,

    Thanks for helping out @guenni007 :-)

    Best regards,
    Rikard

    #1365185

    Thanks a lot @guenni007 and Rikard!

    The bug is partially resolved, the slider no longer displays the alert message.

    But the image of the first slide (which is the fallback image of a video) is not the same height on mobile as the images of the other two slides (which are photos). The height of the fallback image is much smaller than the height of the 2 photos.

    Can you check on a mobile device here: https://www.edunao.com/ ?

    Any idea to fix this?

    Thanks a lot again!

    Olivier

    #1365217

    Hi,

    Thank you for the update.

    You can use the following css code to apply a minimum height to the slides and resize the slide images including the fallback images.

    @media only screen and (max-width: 767px) {
    
      /* Add your Mobile Styles here */
      .avia-slideshow-inner .avia-slideshow li, .avia-slideshow-inner .avia-slideshow li .avia-slide-wrap {
        min-height: 200px;
      }
    
      .avia-slideshow li img {
        object-fit: cover;
        width: 100%;
        height: 200px;
      }
    }
    

    Please toggle or temporarily disable the Enfold > Performance > File Compression settings after adding the css.

    Best regards,
    Ismael

    #1365248

    Hi Ismael,

    Thank you very much for your help, it works!

    You can close the thread.

    Thanks again!

    Olivier

    #1365250

    Oups! Sorry, there is still a bug!

    The height of the video slide is smaller on the desktop version now.

    This is the CSS we add :

    @media only screen and (max-width: 767px) {

    /* Add your Mobile Styles here */
    .avia-slideshow-inner .avia-slideshow li, .avia-slideshow-inner .avia-slideshow li .avia-slide-wrap {
    min-height: 500px;
    }

    .avia-slideshow li img {
    object-fit: cover;
    width: 100%;
    height: 500px;
    }
    }

    See the desktop version here : https://www.edunao.com/

    Can you help on this?

    Best regards,

    Olivier

    #1365341

    Hi,
    Thanks for the link to your home page slider, I see this only occurs on your FR home page and on your EN home page all of the slides are the same.
    Try adding this code to the end of your child theme functions.php file in Appearance ▸ Editor:

    function equal_slider_height() { ?>
      <script>
    window.addEventListener('DOMContentLoaded', function() {
    (function($) {
          $('#top.home #full_slider_1 .avia-slideshow-inner li.slide-1').each(function(index){
              $('#top.home #full_slider_1 .avia-slideshow-inner li.slide-2').find('img').eq(index).css('height', $(this).css('height'));
              $('#top.home #full_slider_1 .avia-slideshow-inner li.slide-3').find('img').eq(index).css('height', $(this).css('height'));
          });
    })(jQuery);
    });
      </script>
      <?php
    }
    add_action('wp_footer', 'equal_slider_height');

    It will get the height of first video slide and apply it the next two image slides.
    After applying please clear your browser cache and check.

    Best regards,
    Mike

    #1365352

    Hi Mike,

    Thank you very much.

    When I paste the code in child theme functions.php file in Appearance ▸ Editor WordPress says that there is an error in the code on this line:

    function equal_slider_height() { ?>

    It says: syntax error, unexpected ‘?’

    Can you help with this?

    Thanks a lot,

    Olivier

    #1365354

    Hi,
    Please ensure that you have copied the code from the forum and not an email as the greater than symbols may paste incorrectly, as the code above is correct:
    2022-09-17_010.jpg
    If you are still having trouble please include a admin login in the private content area so we can take a closer look.

    Best regards,
    Mike

    #1365357

    Hi Mike,

    Thank you, I have copied the code from the forum and now the issue has gone. (I copied from the email in the first place)

    The display on desktop is OK now, but I have a new issue on mobile: the height of the second and third slides is much smaller that the height of the fallback image of the video, check on mobile here: https://www.edunao.com/

    Any idea to fix this? Is this a conflict between the php code and the CSS I added in the first place? (look at the beginning of the thread)

    Thanks a lot again!

    Olivier

    #1365360

    Hi,
    Glad to hear this is helping, try removing your other css and see if that helps.
    If not please include a admin login in the private content area.

    Best regards,
    Mike

    #1365456

    Hi Mike,

    I removed the CSS and it doens’t work on mobile: the height of the 3 slides is too small now, you can check on mobile here https://www.edunao.com/

    I have included a admin login in the private content area.

    Thanks again for your hel!

    Olivier

    #1365462

    Hi,
    Thanks for the login, this is the css I added:

    @media only screen and (max-width: 1024px) {
    #full_slider_1 .avia-slideshow-1 {
    	min-height: 500px;
    } 
    .avia-slide-wrap > img {
    object-fit: cover;
    width: 100%;
    height: 500px;
    }
    }

    this is the updated script:

    function equal_slider_height() { ?>
      <script>
    window.addEventListener('DOMContentLoaded', function() {
    (function($) {
    	var width = $(window).width();
    	if ((width >= 767)) {
          $('#top.home #full_slider_1 .avia-slideshow-inner li.slide-1').each(function(index){
              $('#top.home #full_slider_1 .avia-slideshow-inner li.slide-2').find('img').eq(index).css('height', $(this).css('height'));
              $('#top.home #full_slider_1 .avia-slideshow-inner li.slide-3').find('img').eq(index).css('height', $(this).css('height'));
          });
    	} else {}
    })(jQuery);
    });
      </script>
      <?php
    }
    add_action('wp_footer', 'equal_slider_height');

    please clear your browser cache and check.

    Best regards,
    Mike

    #1365467

    Hi Mike,

    Thank you very much, the issue seems to be solved on the French Version of the Home page in the French version of the site but it seems there is still en issue on mobile on the Englush version, ca you check here: https://www.edunao.com/en/home/ on mobile?

    Thanks a lot again!!!

    Olivier

    #1365495

    Hi,

    We applied a unique ID to the slider (edunao-slider) and edited the script a bit. Let us know if this works.

    function ava_equal_slider_height() { ?>
      <script>
    window.addEventListener('DOMContentLoaded', function() {
    (function($) {
    	var width = $(window).width();
    	if ((width >= 767)) {
          $('#top #edunao-slider .avia-slideshow-inner li.slide-1').each(function(index){
              $('#top #edunao-slider .avia-slideshow-inner li.slide-2').find('img').eq(index).css('height', $(this).css('height'));
              $('#top #edunao-slider .avia-slideshow-inner li.slide-3').find('img').eq(index).css('height', $(this).css('height'));
          });
    	} else {}
    })(jQuery);
    });
      </script>
      <?php
    }
    add_action('wp_footer', 'ava_equal_slider_height');
    

    Thank you for your patience.

    Best regards,
    Ismael

    #1365517

    Hi Ismael,

    I’m very sorry for this but in the meantime the CEO of the company asked us to replace the video slide by a photo slide.

    I did it but we have now a huge bug on the home page.

    Can you undo what you’ve done before on the script because I this the bug comes from the fact that the script is looking for a video that doesn’t exist anymore?

    Very sorry for this again and thank you very much,

    Olivier

    #1365523

    Hi,

    Have you tried removing the the add_action(‘wp_footer’, ‘ava_equal_slider_height’); hook from the functions.php file? This will disable the modification and revert the site to its previous state. Let us know if this helps.

    Thank you for your patience.

    Best regards,
    Ismael

    #1365524

    Hi Ismael,

    Yes I did it but I have bugs on all the blocks of the home page, in French version and in English version.

    Can you login as an admin and check?

    I give you the credentials again in the prrivate area.

    Thanks!

    #1365679

    Hi,
    The issue you were having was due to the Smush lazy loading, I have disabled it for you and now the sliders are working correctly.
    Smush is aware of this issue from other Smush Pro users in our forum, and said they are looking into it, unfortunately, we can not fix this from within the theme.
    Smush is also aware that their page, class, and ID exclusion doesn’t work, otherwise we could have just excluded the slider.
    Please note that the theme has lazy loading built-in at Enfold Theme Options ▸ Performance ▸ Responsive Images And Lazy Loading so you still have lazy loading without the plugin.

    Please clear your browser cache and check.

    Best regards,
    Mike

    #1365708

    Hi Mike,

    Thank you so much, everything works perfectly, your help is great!

    You can close the thread,

    Thank you so much again,

    Olivier

    #1365736

    Hi,

    Great, I’m glad that Mike could help you out. I’ll close this thread for now then, please open a new thread if you should have any further questions or problems.

    Best regards,
    Rikard

Viewing 22 posts - 1 through 22 (of 22 total)
  • The topic ‘Bug on Easy Slider’ is closed to new replies.