-
AuthorPosts
-
September 13, 2022 at 7:42 pm #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
September 13, 2022 at 9:19 pm #1364960under 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.September 14, 2022 at 11:18 am #1364984September 15, 2022 at 7:48 pm #1365185Thanks 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
September 16, 2022 at 9:19 am #1365217Hi,
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,
IsmaelSeptember 16, 2022 at 2:10 pm #1365248Hi Ismael,
Thank you very much for your help, it works!
You can close the thread.
Thanks again!
Olivier
September 16, 2022 at 2:13 pm #1365250Oups! 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
September 17, 2022 at 3:04 pm #1365341Hi,
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,
MikeSeptember 17, 2022 at 7:08 pm #1365352Hi 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
September 17, 2022 at 7:31 pm #1365354September 17, 2022 at 8:16 pm #1365357Hi 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
September 17, 2022 at 8:48 pm #1365360Hi,
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,
MikeSeptember 18, 2022 at 7:55 pm #1365456Hi 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
September 18, 2022 at 9:22 pm #1365462Hi,
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,
MikeSeptember 19, 2022 at 12:27 am #1365467Hi 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
September 19, 2022 at 9:32 am #1365495Hi,
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,
IsmaelSeptember 19, 2022 at 11:47 am #1365517Hi 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
September 19, 2022 at 12:09 pm #1365523Hi,
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,
IsmaelSeptember 19, 2022 at 12:14 pm #1365524Hi 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!
September 20, 2022 at 11:56 am #1365679Hi,
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,
MikeSeptember 20, 2022 at 2:44 pm #1365708Hi Mike,
Thank you so much, everything works perfectly, your help is great!
You can close the thread,
Thank you so much again,
Olivier
September 20, 2022 at 4:41 pm #1365736Hi,
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 -
AuthorPosts
- The topic ‘Bug on Easy Slider’ is closed to new replies.