Fix Wordpress rss Feed Error
Home > Wordpress June 12th, 2010Wordpress 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.
December 29th, 2010 at 5:27 am
I tried the above methods, last my feed is ok. although the matter is resolved, but this option is the heavy workload, we should honestly available every single php file checks, revised once more uploaded towards server, activate the plug-in to see if there are problems.
February 27th, 2011 at 12:36 am
Thanks, i remove all spaces in archives feed and rss and feed now are ok! Great tips! I love you!
March 26th, 2011 at 4:55 pm
nice fix, this it what i searched for!
August 31st, 2011 at 12:37 pm
This solved my problem too actually:
http://www.piotrkrzyzek.com/wordpress-remove-blank-line-from-rss-feed-wordpress-error-on-line-2-at-column-6-xml-declaration-allowed-only-at-the-start-of-the-document/
February 17th, 2012 at 5:40 am
“Wordpress how to correct rss feed in the Error on line 2: The processing instruction target matching “[xX] [mM] [lL]” is not allowed error?” is very useful to me in the future. Thank you for sharing useful issue to me and i learn how to rectified error in wordpress.
April 4th, 2012 at 11:16 pm
Thanks Leo for the link. This issue comes up a lot though for most people the solution I wrote about on my page seems to work. Good thing Go Fun Now wrote another solution just in case mine doesn’t work. The weird thing is, there are so many causes of “Error On Line 2″ in the RSS feed that it’s hard to tell what’s what.
http://www.piotrkrzyzek.com/wordpress-remove-blank-line-from-rss-feed-wordpress-error-on-line-2-at-column-6-xml-declaration-allowed-only-at-the-start-of-the-document/
June 23rd, 2012 at 10:56 am
removed spaces in archives feed and rss
Now its working fine
Great and useful tips
Really awesome
December 29th, 2012 at 6:44 am
I am stuck on where I and what exactly I do at this step. Everything else is working fine, at least based on your straight forward instructions: Before fix feed error, you must to set writable permission to /services3/webpages/t/h/thenod.ca/public/site3/wp-blog-header.php file, otherwise will no success!
January 18th, 2013 at 12:32 am
This page contains the following errors:
error on line 143 at column 31: Input is not proper UTF-8, indicate encoding !
Bytes: 0×03 0×3C 0×2F 0×70
Below is a rendering of the page up to the first error.
I can’t fix this problem!!!
Can You Help :(