Solution for WordPress Feed XML Parsing Error – XML or text declaration not at start of entity

Posted by Microments 7 July, 2009

My RSS feeds started to act weird this evening.

The FireFox browser gave this error when I tried to view the feed.

XML Parsing Error: xml declaration not at start of external entity … Line Number 2, Column 1:<?xml version=”1.0″ encoding=”UTF-8″?>

The problem was caused by one of my plugins that inserted a blank line at the top of the RSS feeds.

The solution is to find that offensive plugin and remove any leading or trailing lines before and after the <?php and ?> PHP code respectively.

Solution

  • Check your wp-rss2.php and wp-atom.php files for blank lines outside of <? and ?> bracketed sections.
  • Check your wp-config.php file for blank lines outside of <? and ?> bracketed sections.
  • Check your theme’s functions.php file for blank lines outside of <? and ?> bracketed sections.
  • One by one, disable plugins and revalidate until you isolate the one causing the problem.

I hope this helps you if you’ve faced a similar problem.

© 2009, Microments. All rights reserved. On republishing this post you must provide link to original post.

Blog Widget by LinkWithin
Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • BlinkList
  • Blogosphere News
  • Diigo
  • Live
  • MySpace
  • Reddit
  • StumbleUpon
  • Technorati
  • Twitter


Check Out Similar Topics
Categories : Programming and Technical Discussions Tags : ,

Comments

Silent gratitude isnt much use to anyone - G B Stern
Encourage our posters by saying Thank You!


Leave a comment

Register to post comments

Registration is Free, Simple | Already a Member ? Log in | Forgotten your password ?