Wordpress how to correct rss feed in the Error on line 2: The processing instruction target matching “[xX] [mM] [lL]” is not allowed error?
Today, I want to wordpress rss feed submitted to the http://www.feedburner.com to burn, but there was an error “Error on line 2: The processing instruction target matching “[xX][mM][lL]” is not allowed.
In addition, In foxfire enter the feed address, also appeared “XML or text declaration not at start of entity” error, and in opera appeared “XML declaration not at beginning of document” error.
Began looking for a solution, and find a feed validation site http://feedvalidator.org, it can not only find errors in your feed, but also it can tell you how to fix the error.
I get an answer from the http://feedvalidator.org/docs/error/WPBlankLine.html, if an XML declaration (<?xml … ?>) appears in your feed, it must be the first thing in the feed, before any whitespace, so the solution is below:
1. Check and delete the wp-rss2.php and the file wp-atom.php In <? … ?> Blank lines outside, if you still have problems, went to step 2
2. Check and delete the wp-config.php file In <? And ?> Blank lines outside, if you still have problems, go to the Step 3
3. Check and delete your template theme in the functions.php file In <? … ?> Blank lines outside, if there are still problems, to the first step 4
4. One by one too close to your plug-in, to see whether the problem still exists, if there is no problem, they just now close the plug-ins there is a problem of the php file to open it, and modify, so that should be able to solve the problem.
I tried the above methods, final my feed is ok. Although the issue is resolved, but this solution is the heavy workload, we must honestly open each php file checks, revised again uploaded to the server, activate the plug-in to see if there are problems.
Are there other convenient way to do? The answer is yes, you can develop a plug-in, this plug-in will find all of the php files to see whether the head and tail of blank lines, if there are found, then delete the blank lines, so that need not be so laborious.
2008-12-30 has developed fix rss feed plug-in, you can go to http://www.gofunnow.com/wordpress/plugins/fix-rss-feed-error-wordpress-plugins.htm download this plug-in.