The plugin generated 80 characters of unexpected output!

When you get this kind of message is usually means your plugin had a syntax error and was generating that kind of error messages because of how the loading on activation is handled, i.e. HTTP headers are sent after the error message is display. Your plugin’s error message is loaded in an <iframe>; have you done a “View Source” on the <iframe> to see if there’s an obvious error message?

Also, you should consider getting an HTTP debugger which can help with this kind of things:

  • Windows has the excellent and free Fiddler.

  • For Mac OS X there’s HTTPScoop (not great, but inexpensive at US$15.)

  • There’s also Charles for Windows/Mac/Linux (US$50 – I may break down and buy it one day. Wish I could get Fiddler on Mac, but since Fiddler comes from Microsoft I don’t hold my breath.)

UPDATE

Based on the comments below, here’s a screen of me using “Inspect Element” in Safari (but you can do the same with Chrome and FireFox, or similar with IE and the Web Developer Toolbar):

Screenshot of Element Inspector on Safari with the WordPress plugin error IFRAME
(source: mikeschinkel.com)

You can grab that <iframe>d URL and load it directly in your browser to make the process of debugging easier. Something in your plugin is sending q header() after an error message is thrown, that’s what that error message means.

Loading WordPress Plugin Activation URL directly from the browser
(source: mikeschinkel.com)

BTW, I just added a stray character and hence syntax error in my plugin to get it to throw an error which is why you see the error as you do.

Leave a Comment