Skip to content

"Simple Lightbox" and "Cookie Law Info" can not work toguether #71

Closed
securamente opened this Issue Oct 17, 2013 · 8 comments

3 participants

@securamente

WordPress v3.6.1
Simple Lightbox v2.1
Cookie Law Info v1.1.2

"Cookie Law Info" plugin seems to break "Simple Lightbox 2.1", when CLI is activated SL stops working. I reported the bug to CLI, and according to the author "the lightbox plugin you mention will almost certainly be hard-coding a javascript which is should not be doing. Instead it should use wp_enqueue_script(). It is something you should raise with the author of that plugin."

Don't know if that is correct, more info can be found here:
http://wordpress.org/support/topic/cookie-law-info-clash-with-jsquery-lightbox?replies=6#post-4768490

@archetyped
Owner

Thanks for the report.

I have tested CLI and SLB appears to be functioning properly. There may an issue that is more specific to your site.

Can you temporarily enable CLI on a test server (or production server if you have to) so that the issue can be investigated further?

@kmhaley
@securamente

Strange. Before contacting the CLI author I tested it with 4 different themes just to make sure it was not my theme (I use Grephene, I also tried with twenty-eleven, twenty-twelve and twenty-thirteen).
I also disabled all plugins on my blog except for CLI and SLB, and the result was the same.

So, with a plain WP 3.6.1, SLB 2.1 and CLI 1.1.2 it was not working at all.

I will test now on a different server and see how it goes there.

@securamente

Ok, here you go. I had a cloned site on a different host since I am thinking on switching hosts, and the problem also happens on the other site.

My real site is: http://www.securamente.com - This one right now has SLB enabled and CLI disabled, so SLB works fine.
The test site is: http://arsebulica.pruebafactoriadigital.com/ - It is a copy of the blog from a few days ago (so the last 3 posts are missing), all the rest is the same. I disabled all plugins escept SLB and CLI, and I changed the theme to twenty thirteen. Now when you load the site from a clean browser, first time you visit the blog you get a bar on the bottom warning you about EU laws about cookies, etc. And then when you click on an image, instead of the lightbox coming up, it will load the full post (even if it is the test site, it will load on the real site, I guess I should have changed something/somewhere, but I didn't look enough since it was just a test).

Without CLI, SLB works great. With CLI, SLB does not work, and clicking on a picture will load the post (not even the image), instead of showing the lightbox with the image in bigger resolution.

Thanks for your time!

@archetyped
Owner

Thanks for setting up the test server. Unfortunately, SLB has no way to tell if a link on an external site (in this case securamente.com) is pointing to an attachment or not (or even if the other site is WordPress based). In other words, attachments will only be displayed in a lightbox on their own site.

As a result, there are no valid links for SLB to activate on the test site. Even if you disabled CLI on the test site, SLB would not work for the external attachment links.

In truth, all I would need is a single post with links to images on the test site. If you can send me a link to a post with some image links (use the file URI rather than the attachment for the sake of simplicity) then I should be able to see what's going on.

@securamente

Well... I created a new post on the test site so the image is linked locally, and it works great.
http://arsebulica.pruebafactoriadigital.com/

I then enabled CLI on the life site, and it doesn't work, so it must be host related. I left it active in case you want to check it out, but I was using the test site to see if it was worth it to migrate to another host, so maybe it is time to do so.
http://www.securamente.com/

I see I have images linked in 3 different ways; I guess they all work but the best way would be the first one?
http://www.securamente.com/review-del-rikomagic-mk802-iiis-8gb-como-visualizar-camaras-en-tu-televisor/rikomagic1a/
http://www.securamente.com/?attachment_id=2030
http://www.securamente.com/wp-content/uploads/2013/10/nvr1.jpg

@archetyped
Owner

Yes, I can confirm that SLB and CLI are both working on the test site.

However, the live site is reporting a JS error caused by CLI which causes all other JS (including SLB) to stop working.

You may want to delete CLI's folder in the plugin directory on the live site and reinstall it from scratch as there may be missing or corrupt files. If you're still experiencing a problem after that, I'd recommend contacting CLI's developer to report the issue.

I'm closing this ticket as the issue does not appear to be related to SLB. Please feel report any other issues you encounter.

@archetyped archetyped closed this Oct 19, 2013
@archetyped
Owner

I see I have images linked in 3 different ways; I guess they all work but the best way would be the first one?

Which type of link you use depends on what you want to happen if SLB is disabled. The first 2 links will go the attachment page (though it doesn't appear that this is working properly on your site), while the final link will load only the image file in the browser when clicked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.