simple-lightbox icon indicating copy to clipboard operation
simple-lightbox copied to clipboard

Support for SSL?

Open MikesTooLz opened this issue 11 years ago • 23 comments

Wordpress 3.8 website: www.miamidadelostpets.com

I had simple lightbox plugin working on my page but recently I added and SSL certificate to my site.

under Settings > General in wordpress I have changed both wordpress address and site address from http to https

Now simple lightbox is not working on the main page. I'm guessing that this is because its looking for https on the main page but links are going to http. Would be great if it could be updated to work with both.

MikesTooLz avatar Dec 24 '13 19:12 MikesTooLz

Hi, SSL should not have any effect on SLB's ability to display an item in the lightbox.

However, the image links on the page you provided appear to change based on the protocol page is being loaded by (HTTP or HTTPS). This change may be occurring after SLB has a chance to activate links on the page which could explain why certain images are not loaded in the lightbox.

Two questions:

  • How are the image links being generated for the posts on the site?
  • What other plugins are installed?

archetyped avatar Dec 25 '13 02:12 archetyped

I'm using the plugin Wordpress HTTPS v3.3.6 everything is currently on default settings with Force SSL Administration enabled, this forces ssl for admin panel.

if I visit http://www.miamidadelostpets.com the pictures all have http links and dont work. if I visit https://www.miamidadelostpets.com the picture links are all https and lightbox works.

P.S. happy holidays, I wasn't expecting a response so quickly.

MikesTooLz avatar Dec 25 '13 20:12 MikesTooLz

disabling Wordpress HTTPS v3.3.6 make simple wordpress work again via both http and https.

any suggestions for an alternative to force https for specific pages that would also work with simple lightbox?

MikesTooLz avatar Dec 26 '13 16:12 MikesTooLz

Hi, thanks for the update. I am currently looking into this and will let you know what I find.

archetyped avatar Dec 31 '13 22:12 archetyped

I can confirm the above referenced issue. I am also using HTTPS 3.3.6 to more completely protect my company intranet page. Whenever enabled, the light box functionality is not consistently working. I have not figured out, what triggers the picture not to come up in a lightbox. Sometimes it works, sometimes not...

lotz98 avatar Jul 02 '14 01:07 lotz98

Have you discovered any workaround for this?

henningko avatar Oct 18 '14 17:10 henningko

For all most recent posts (since installation of the HTTPS plugin) it seems to work now...?!? So, I put it aside. Have not spend time to figure out why older posts don't work...

lotz98 avatar Oct 18 '14 18:10 lotz98

Interesting. I have activated HTTPS and updated the site URL to https, but it will still not work on any posts (using the latest beta).

henningko avatar Oct 20 '14 03:10 henningko

Frustrating, I know....:-(

On Sun, Oct 19, 2014 at 11:41 PM, Henning Kollenbroich < [email protected]> wrote:

Interesting. I have activated HTTPS and updated the site URL to https, but it will still not work on any posts (using the latest beta).

— Reply to this email directly or view it on GitHub https://github.com/archetyped/simple-lightbox/issues/112#issuecomment-59680480 .

lotz98 avatar Oct 20 '14 23:10 lotz98

How is it going whit this? I have recently switch my site (https://www.myabdllife.com/) over to SSL and now simple lightbox not works any more.

tobias86aa avatar May 08 '15 06:05 tobias86aa

Hello - I have just finished developing a website which makes extensive use of SLB and the Video Haddon. We installed the SSL and poof - that was the end of SLB. It works on non SSL but not on SSL - a major blow as this is a very prominent brand website, with hours of work which now has to be redone. Is there a workaround available please?

EdwardN1 avatar Feb 25 '16 16:02 EdwardN1

@EdwardN1 please provide a link to a page that exhibits the issue you are experiencing and I would be glad to take a closer look.

archetyped avatar Feb 26 '16 01:02 archetyped

Thank you for the quick response, at this point the site is in development, close to release, so I am not allow to link to it in a public forum unfortunately - I written something based on magnetic popup as a stop gap, as the client has become very time sensitive. I will try had replicate the issue elsewhere, as a demo at some point if I get a spare moment!

EdwardN1 avatar Feb 26 '16 08:02 EdwardN1

How is it going whit this?

tobias86aa avatar May 08 '16 14:05 tobias86aa

I guess this still isn't resolved?

https://relcontrols.ca/products/controllers/proweb-series/41-mach-prowebcom

Keelan avatar May 24 '16 16:05 Keelan

Hi @Keelan, it appears that cURL is not properly configured/enabled for your site. Please see SLB's minimum requirements for more details on cURL support.

Also, your theme appears to have some JavaScript code that is causing an error. This error is stopping all other JS code (including SLB's) from running. This will also need to be resolved before SLB can function normally.

archetyped avatar May 24 '16 21:05 archetyped

Yes after i submitted this n I discovered it seems my theme update has disrupted a bunch of plugins.

The curl thing is odd though because this did work before.

I'll look into it and report back. Thanks. On May 24, 2016 5:27 PM, "Archetyped" [email protected] wrote:

Hi @Keelan https://github.com/Keelan, it appears that cURL is not properly configured/enabled for your site. Please see SLB's minimum requirements for more details on cURL support https://github.com/archetyped/simple-lightbox/wiki/Requirements#curl-support .

Also, your theme appears to have some JavaScript code that is causing an error. This error is stopping all other JS code (including SLB's) from running. This will also need to be resolved before SLB can function normally.

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/archetyped/simple-lightbox/issues/112#issuecomment-221401096

Keelan avatar May 24 '16 21:05 Keelan

I'm having the same issue. Can't make it work with HTTPS. Here is my cURL info: http://i.imgur.com/6V8Ka40.png And an example page: https://localizacomopuedas.es/?p=770

Artuvazro avatar Nov 26 '16 14:11 Artuvazro

Hello,

I think the problem here is not related to Simple Lightbox plugin.

Using SSL/TLS requires a certificate installed on the web server. However, for some performance reasons, some host providers may choose to install the certificate on a load balancer. This affect cURL which cannot not perform local requests using HTTPS since there is no certificate on the server itself.

@Artuvazro: I just looked at your provider and you use OVH (me too !) which is affected by this problem. However, OVH uses a port forwarding on there Web servers for SSL/TLS. So you can perform a local request using http://localizacomopuedas.es:443/?p=770 (use http and specify the port 443). Consequently, I think you need to change all https IMG URL to HTTP with 443 specified in cURL (a patch to the Simple Lightbox plugin could be developed). Since I have the same problem, I guess I will work on it when I have time.

Eole-dev avatar Dec 21 '16 13:12 Eole-dev

@EoleDevel Yes, I could do that, but if all the content is not in https then you don't get the green lock, or am I wrong?

Artuvazro avatar Dec 21 '16 16:12 Artuvazro

I'm talking about local requests (web server to web server). Clients are not aware of this stuff so it doesn't affect the green lock.

Eole-dev avatar Dec 21 '16 18:12 Eole-dev

I had same problem.

Using SSL/TLS requires a certificate installed on the web server. If you certificate is not properly installed you could simply add this line in your functions.php

add_filter( 'https_ssl_verify', '__return_false' );

This potencial problem could be avoided if plugin use file_get_contents instead to wp_safe_remote_get to read template file (simple-lightbox/includes/class.base_object.php)

cafsantos avatar Oct 03 '19 09:10 cafsantos

This potencial problem could be avoided if plugin use file_get_contents instead to wp_safe_remote_get to read template file (simple-lightbox/includes/class.base_object.php)

Alternatively, change line 254 of includes/class.base_object.php to

	$get = wp_safe_remote_get($ret, ['sslverify' => false]);

I found that I needed to do this in my local installation ( Windows server) where I have SSL enabled, but have never managed to correctly configure the SSL certificate to support local requests using https:.

bobbingwide avatar Jan 05 '21 21:01 bobbingwide