Image effects NextGen gallery failing

By | February 14, 2011

It was recently brought to my attention that the WordPress plugin I use for posting images on this website was not working properly anymore, thanks for warning me of this issue. Well not working properly in the sense that images would get opened in the same window, with no options to navigate back to the post.

Initially I thought that this was caused by the plugin I use for this called NextGen Gallery. After all this plugin failed to do its job properly, but unfortunately that was a bit stupid thinking on my part. I should have realised that the plugin stopped working after an upgrade of the WordPress blog powering the website. For some reason the thickbox JQuery extension produced JavaScript exceptions.

I don’t know exactly why it doesn’t work like expected and I don’t really care either. Suffice it to say that changing a small piece of code in the ‘wp-includes/js/thickbox/thickbox.js’ fixed the issue. All I had to do is modify the tb_init function into the following:

function tb_init(domChunk)
{
     jQuery(domChunk).bind("click", tb_click);
}

I think it must have been some conflict in the JQuery versions or something, since it used to call the ‘.live‘ method on JQuery. But this was what was causing the exceptions. If anyone knows a more permanent fix for this issue please let me know.

Leave a Reply