I have a small problem in my code, but it is resulting in a big headache.
I am using the Print Widget (w/ a proxy). If you press the button once, a couple of errors are thrown (in Firebug), and the process fails. However, the next time the button is pressed (and forever after), it works.
Interestingly enough, if you don't select a layer in the dropdown, the print process will work the first time.
I have stripped down the code to the bare minimum to illustrate the problem. I would be thankful for any suggestions.