Workaround for the most annoying Wordpress-Gallery-Image bug ever
So after spending way too many hours trying to track down a bug in Wordpress I finally stumbled upon this workaround that at least lets me post a gallery to my blog.
Symptoms of the problem:
When trying to insert a picture to a post, a blank screen loads. The following error can be seen in Firebug:
win.send_to_editor is not a function
When trying to insert a gallery, nothing happens when the button is clicked. The following error can be seen in Firebug:
b.getWin().send_to_editor is not a function
There is all types of stuff on the internet about problems with jQuery, using capitols in the domain name in the Wordpress settings, etc. None of those fixes worked for me. (I'm on Debian with Wordpress 3.0.5). However, after reading a post about copying out some of the raw HTML that is produced with the first error, I started looking around at the HTML of previous posts where galleries worked.
It turns out that Wordpress somehow stores the galleries in relation to a post. So, to work around this problem, first write your post. Then click the add an image button and build your gallery the way you like it. Save all changes and then go back to your post (by closing the tab and reopening your blog or by using the back button several times). Then--and this is the magic--edit the HTML of your post and add the following line:
That's it!! That is the code that the insert gallery button is somehow unable to produce! Wordpress automagically knows which gallery to insert because it's already secretly attached to the post behind the scenes. And don't even ask me what type of HTML code is [gallery columns="2"], because it ain't.