Eric Cheng

View Original

Wordpress Lightbox and PicLens plugins clash

I don't know why it took me so long to discover the conflict, but Wordpress' Lightbox and PicLens plug-ins don't work so well together. When both installed, PicLens works, but Lightbox freezes if you try to navigate to another image while one is already displayed. I put out a cry for help using Twitter, and Cor Bosman wrote back with the answer. It was in Cor's best interest to figure out the problem, anyway, because he's using a similar system. :)

The problem is that lightbox-2 and wp-piclens both use a function called "pause()". "Pause" is so common that I'm amazed that someone would use it in javascript code.

To fix the problem, we just renamed all instances of "pause" in lightbox-2's lightbox.js to something else.