skip to main content

TAMU Webmaster's Blog

Information and insight from the A&M Webmasters

WordPress Lessons Learned

September 18th, 2009 by Erick Beck

I got a problem ticket yesterday saying that the RSS feeds for this and all of our other blogs had quit working, the error stating that the XML was invalid because there was a blank line at the top of the file where the xml declaration was expected to be.  A Google search showed that this same problem ws affecting lots of bloggers out there, but there did not seem to be one bug consistently causing the same problem for everyone.

Finally I tracked it down to an upgrade I made a few weeks ago. As we are updating our hardware architecture we are also upgrading things like access control and password policy.  I had therefore moved the WordPress database login information into a file outside the web root and called the information as variables rather than hard-coded strings.  Unfortunately this php include file had a line break after the final closing ?>  and because of the multiple include calls WordPress makes before it ever prints a line, this space got stuck at the top of the RSS feed and invalidated it. So lesson to be learned — when modifying WordPress files be very careful about hitting that “enter” key.

(Note, because we publish through Feedburner, which is not real time, you may still be getting the error on the feed. This should resolve itself as Feedburner refreshes itself.)

Tags: ,

Friday, September 18th, 2009 Miscellaneous
Share this article

No comments yet.

Leave a comment