Firelight
Forum Replies Created
-
@optimizingmatters – Thanks so much for following up here with an update. Much appreciated, and glad to see this is resolved.
Can I ask what lightbox you are using (ie, which version of fancybox)? That may have an impact.
Hi, we did add the dompurify script to the plugin in a recent update. It is required as dependency for fancybox now – we load it before fancybox – so it should *always* be loading.
Apparently it is not for you. I’ll take a look today to confirm we’re loading it in all cases, especially around youtube videos.Since we have at least a temporary or work around solution for this – excluding the dompurify script – and since the issue obviously evolves from that third party script itself, I’m going to mark this issue resolved. But I’ll still consider it something we need a better long term solution for.
Worth noting that the dompurify script/package that’s conflicting with autooptimize here is massively popular. It is effectively the standard script for sanitizing content in JavaScript ecosystem and gets about 6 million downloads per week. Given all that, I’m quite surprised at the conflict.- This reply was modified 1 year, 7 months ago by Firelight.
Hi Matthieu,
Wow, thanks for digging into this. You did most of the troubleshooting for me :). Thanks for narrowing down the issue for me and for others who may see this.
I’ll also look more into what’s going on here and see if I can find a solution.Hi,
I did update some JS code, and re-minified our JS files for the lightboxes. But autooptimize should be able to handle a situation where another plugin updates its own JS.
You don’t happen to know what the error was that you saw do you? If you are open to it, it would be great if you could temporarily stop excluding our JS, try it again, and if the error appears, just copy that here. That would give me a sense for what the issue might be. You could then add the exclusion back if needed.
Thanks!Forum: Plugins
In reply to: [Firelight Lightbox] Windows width and hight now workingHi,
It sounds like you have two concerns or issues to me. First is that your images are appearing smaller than you want. Second is that you are trying to fix that by updating the width/height settings to be larger, and that is not working. Am I correct on both of those?
1) On image size… Are you adding these images via the block editor (ie, with an image or gallery block)? If so, can you go to the image block, look at the side bar where the image block settings are, and find the ‘Resolution’ setting. My guess is that it is set to ‘Large’. Try setting it to ‘Full Size’ and see what happens.Basically WordPress generates image sizes for you. By default it may try to use one of its auto-generated images sizes, which is smaller than your original. And as a rule, Fancybox won’t display an image larger than its actual size.
2) On the width/height settings, I should update the description to be more clear. But for images, these will only apply if Fancybox cannot determine the size of the underlying image and work with that. Otherwise, the size of the display is based on the size of the image OR, if the image is bigger than the window and you have ‘scale to fit’ turned on, the image will be scaled down to the window size plus anything you have set in the ‘Window margin’ setting.
In any case, can you give # 1 a try and let me know if the image displays larger?
If that does work, you’ll have a bit of a second problem which is that those are very large images to display would could affect load time of the images especially on mobile devices.
Forum: Plugins
In reply to: [Firelight Lightbox] navigate between modal popupsHey Dan,
So this is possible but a bit cumbersome right now. Basically when Fancybox looks for links to open, it will check if they have a rel=”gallery” attribute on the link. If so, it will group them together and allow you to navigate between them. This will work for images as well as inline content.So for links to open modals, you need to add rel=”gallery” TO THE LINK.
The question is how to add that. If you are working in html, it is obviously very easy. It might just look like this:<a href="#modal1" class="fancybox-inline" rel="gallery">Open Modal 1</a>
<a href="#modal2" class="fancybox-inline" rel="gallery">Open Modal 2</a>If you are working in the block editor, though, it is is not easy to add an attribute like this to the link. There are plugins like https://wordpress.org/plugins/attributes-for-blocks/ that allow you to add attributes to blocks. But if you add a paragraph block, and then convert text to a link, and then use the plugin above to add attributes to the block, the attribute will be added to the p tag, not the a tag, and it needs to be on the a tag.
Obviously you can always find a way in WordPress, and this isn’t rocket science. But it depends on how your adding content.
I should build an easier way to add fancybox classes and attributes to relevant blocks. I’ll add that to my list of feature requests.
Forum: Plugins
In reply to: [Firelight Lightbox] Lightbox not working on IpadHi – Since it’s been 2 days, I wanted to post quickly that I’m going to look at this today. Mobile devices including ipads use their own pdf viewer to open PDFs and they often do not play well with lightboxes. I want to check the status of this on a few devices types, and I’ll follow up.
Forum: Plugins
In reply to: [Firelight Lightbox] Plugin Not workingHi,
If you go to Lightbox settings, open the first ‘Enable’ accordion, is ‘Enable for Youtube’ checked? If not can you check that and let me know if it now works?
If you have that checked and also ‘autodetect’ under Youtube, I’m wondering if there’s a JS error breaking things. I’m not sure if you know how to use the dev console, but try this: right click on your browser screen and select “inspect’ to open dev tools. The dev tools will have a horizontal menu across the top. Click ‘Console. Refresh the page, try opening the video, and let me know if you see a red error in that console area.
Thanks.Forum: Plugins
In reply to: [Firelight Lightbox] Form in lightbox not workingHey – Still haven’t figured this out with the free lightbox. Resetting recaptcha after the lightbox loads is not sufficient to fix the issue.
I’ve also confirm this DOES work with the Firelight Pro lightbox. I put up a demo for you to see here: https://firelightwp.com/pro-lightbox/ninja-forms-in-lightbox-popup/
The fact that it works with the Pro Lightbox and not the free one obviously means that it is something about the free lightbox that’s interfering with recaptcha. It’s worth noting that the issue here is likely a conflict between recaptcha and the *actual* fancybox V1 and V2 lightbox script. That’s not something we created, but rather something we’re wrapping into a plugin here. It’s also worth noting that those are older versions of Fancybox (the Pro Lightbox is the newest version, which is V5).In any case, I’ll keep troubleshooting, but will probably need to pick this up again tomorrow.
Forum: Plugins
In reply to: [Firelight Lightbox] Form in lightbox not workingHi – I just wanted to follow up and let you know I’m still working on this.
First, I was able to fully duplicate the issue on a live site.
Second, I think it will require resetting or reloading the recaptcha field after it becomes visible in the lightbox. That said, my efforts to do that so far haven’t worked or resolved the issue yet. It may still be a timing issue. In any case, I’m sure I’ll figure this out eventually. I will try to work on it some more tomorrow (Sunday) and will follow up .Forum: Plugins
In reply to: [Firelight Lightbox] Form in lightbox not workingHi. I did set up a Ninja form in the lightbox yesterday and it was working fine. But that was without recaptcha.
I highly suspect that the issue may arise from putting recaptcha in a modal (or in any content that is originally hidden and then displayed afterwards). There are a number of reports for this sort of thing if you search Google for the JS error on your site (ie, “recaptcha Uncaught (in promise) Timeout (z)”).
But I can’t set up recaptcha on my local dev instance. I need to do it on a live site, and I didn’t get to doing that yesterday.
You could quickly confirm this is the issue by temporarily removing recaptcha from that form and confirming the form works in the lightbox without recaptcha. If so, then we know that there is basically a conflict with recaptcha in a lightbox. If that’s the case, I think it will require a specific code fix on our side to effectively reset reacaptcha after the lightbox is opened.
Otherwise, I’ll try to get that set up today and confirm and, if that’s the issue, start investigating a fix.Forum: Plugins
In reply to: [Firelight Lightbox] Form in lightbox not workingHi, I suspect that JS error is breaking things, but I’m not entirely clear where that is coming from. I will try to set up a Ninja form in a lightbox locally and see if I can duplicate the issue. If I can, I’ll work on a fix. If not, it’ll be something specific to your instance that we’ll need to troubleshoot. I will follow up tomorrow on this.
Forum: Plugins
In reply to: [Firelight Lightbox] Lightbox feature isn’t workingHi!
To get the lightbox to open in the classic editor, you’d insert an image using the Add Media button. Once it is inserted, click on the image and click the edit/pencil icon which will open the image settings. And then set the image to open media file. That should do it. Give that a try and let me know if it’s working for you.
Out side the classic editor, I have update the plugin so it will open images without needing to set it as Link To: Media File. I will plan to extend that to Classic Editor so this extra step is not necessary.