-
AuthorPosts
-
March 5, 2021 at 4:16 pm #1285818
Hi, I have a bug on a customer website: the lightbox for the first image show more image and video.
That not in the all website but in some case. I dont find where the bug it is.
See this page and use the lightbox on the first image, the lightbox display videos who are present on an another page!!
In this page all images of the first section are displayed on the first ligntbox.
In this page all is correct.
I try to find some bad code but all entries are corrects.March 12, 2021 at 4:43 am #1287572Hey Jean,
I’m very sorry for the late reply. Please send us a temporary WordPress admin login and login URL so that we can have a closer look. You can post the details in the Private Content section of your reply.
Best regards,
RikardMarch 12, 2021 at 9:51 am #1287617Ok, thank you Rikard.
March 17, 2021 at 8:06 am #1288652Hi Jean,
Sorry for the late reply. I’ve added this to your function.php file, in order to stop those videos which looks to be added by a playlist:
function popup_no_gallery() { if( is_single(7538) ) { ?> <script type="text/javascript"> (function($){ $(window).load(function(){ $('a.lightbox-added').magnificPopup({ type: 'image', mainClass: 'avia-popup mfp-zoom-in mfp-image-loaded anchor-link', preloader: true, midClick: true, gallery: { enabled: false }, }); }); })(jQuery); </script> <?php } } add_action('wp_footer', 'popup_no_gallery');
This will only apply to the post in private, please review it.
Best regards,
RikardMarch 17, 2021 at 11:38 am #1288697Hi Rikard, the problem is still there. No change for me.
Regards.
JeanMarch 17, 2021 at 12:46 pm #1288719hey Jean – a few days ago i come to your topic here and indeed i saw your described behavior on the first link.
But now – when i open your link the image is loaded in the lightbox but video not.
Did you solve your problems?By the way: what function did the gallery have in your layout ?
Edit: oh now i see – i did only check the small image under the big one. Yes – it is still there-
I would try to separate the colums by putting them in different color-sections. Because you do not have sidebar here – this would be an option.
This is strange because you haven’t an image link on the videos.
This behavior i got once because i set up an image with youtube open in a lightbox. But even there are different lightbox types ( image, iframe)
@Rikard : that extra-class : anchor-link is only on my installation present. Not on default Enfold settings. ;)- This reply was modified 3 years, 8 months ago by Guenni007.
March 17, 2021 at 1:06 pm #1288724And even if i set the videos in advanced tab of the video alb element to show in lightbox – the galleries are separated:
https://webers-testseite.de/jean/March 17, 2021 at 9:47 pm #1288793Page with one image and one video
Page without video but in the lightbox the Ginaka video is displayed!!
March 18, 2021 at 9:44 am #1288903it had to be an additional tool or script-
if i inspect my test page to look for the youtube id – i only find these ( in this case 4 sources – local preview image with same id – iframes ) but all are place inside the color section it concerns.
When i inspect your site and look for the id: Ri38SkRFDcY there are a lot of script entries about that ID – script with class: rank-math-schema-pro.
Maybe this is causing the issueMarch 18, 2021 at 9:47 am #1288904Ok now i see – you got a link in that toggle – with the playlist of your videos.
just a moment – allthough this is an iframe lightbox it seems to build a gallery with the image.
it is this playlist linking to a lightbox which is part of the gallery – not the videos beneath.
…
maybe this is a bug – don’t know if it is enfold or the new magnific-popup script since jQuery 3.5.1 that causes the issue.
i believe i remember that the mfp-iframe was not included in the image galleries in the past.- This reply was modified 3 years, 8 months ago by Guenni007.
March 18, 2021 at 11:02 am #1288918One chance to get for this image in the first column an own magnific-popup.
give to the first column with that image two custom classes ( put in that custom-class input field: ) noLightbox group1the first class is to hamper enfolds lightbox for all those images inside that column.
The second is for having a trigger to get the popup.put this in your child-theme functions.php:
function open_image_in_popup_group(){ ?> <script type="text/javascript"> (function($){ $(window).on('load', function(){ $('.group1').magnificPopup({ delegate: 'a', type: 'image', mainClass: 'avia-popup mfp-zoom-in mfp-image-loaded', closeBtnInside: true, closeOnContentClick:false, midClick: true, gallery: { enabled:true } }); }); })(jQuery); </script> <?php } add_action('wp_footer', 'open_image_in_popup_group');
See again my test page: https://webers-testseite.de/jean/
- This reply was modified 3 years, 8 months ago by Guenni007.
March 18, 2021 at 11:15 am #1288924Dear Mods and Devs :
maybe this is a bug – don’t know if it is enfold or the new magnific-popup script since jQuery 3.5.1 that causes the issue.
i believe i remember that the mfp-iframe was not included in the image galleries in the past.My assumption:
maybe it’s only the videos that are included in the gallery that call the lightbox using “iframe=true”.March 18, 2021 at 3:37 pm #1289007Or at least you do it without complex solutions. And do it like on those pages – where it works – there you got your playlist link to link to the youtube site with your playlist and not to a lightbox.
see here: https://www.sakura-fishing.com/moulinet/casting-lagoa/March 18, 2021 at 8:12 pm #1289045Hi Guenni007, thank you for your search.
I see that the video is link in accordion to this text:Découvrez notre playlist YouTube Sakura de vidéos dédiée aux moulinets.
If I move this text out of the accordion, the video is not showing in the lightbox. Seems like a bug to me.
Thank you very much!! :-))
Regards.
JeanMarch 18, 2021 at 8:51 pm #1289051i would do it this way: https://kriesi.at/support/topic/lightbox-show-everything-and-more/#post-1288918
See here that it works – even if the playlist link is in a accordion tab: https://webers-testseite.de/jean/#toggle-id-1
Or like you did it on that page: https://www.sakura-fishing.com/moulinet/casting-lagoa/#toggle-id-1-closed
there you have it as external link – to your playlist placed on youtubeMarch 19, 2021 at 11:30 am #1289138Hi Guenni007 in your exemple i dont see a link in the accordion.
With your function i have all links in the lightbox, not work for me.
My customer is going to put all Youtube links outside the accordion.Regards.
JeanMarch 20, 2021 at 12:26 pm #1289327And you really did this step by step : https://kriesi.at/support/topic/lightbox-show-everything-and-more/#post-1288918 and you have not forgotten to insert the two custom classes ( without dots in the inputfield etc. )
Can you give me the link to a page where you have tried that?March 21, 2021 at 6:15 pm #1289482Hi Guenni007, you right, the custom CSS field be hide in the theme settings. I activate it and now all work fine.
Great !!
Thank you very much!! :-))
Have a good day.
JeanMarch 22, 2021 at 3:36 pm #1289651You shouldn’t give up so soon; on your pages I see now that you don’t even let the lightbox open anymore – that’s not how it was meant. Well – I have to take care of my things slowly. Good luck with it.
-
AuthorPosts
- You must be logged in to reply to this topic.