Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#23885 closed defect (bug) (invalid)

error on line 2 at column 6: XML declaration allowed relating to comments RSS

Reported by: RobinInTexas Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.5.1
Component: Feeds Keywords:
Focuses: Cc:


Using 6.51
Twenty Eleven theme with no plugins

permalinks are set to http://mydomain.com/blog/postname/

http://mydomain.com/blog/feed/ works ok

http://mydomain.com/blog/postname/feed/ gives the error

a link to that url appears before the </head> tag
<link rel="alternate" type="application/rss+xml" title="title Comments Feed" href="http://www.''mydomain''.com/blog/''title''/feed/" />

Google is picking this up as a crawl error

Change History (2)

#1 @RobinInTexas
9 years ago

should be

Using 3.51 / Twenty Eleven theme with no plugins

#2 @SergeyBiryukov
9 years ago

  • Component changed from General to Feeds
  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

Could not reproduce on a clean install with Twenty Eleven.

error on line 2 at column 6: XML declaration allowed only at the start of the document

This means that you have some extra output before <?xml> tag in the feed, most likely caused by whitespace or multiple line breaks outside of PHP tags in wp-config.php, theme's functions.php, or a plugin file.

Keep in mind that feeds are often cached by browsers and feed readers, so if you have deactivated all the plugins and the problem remains, a force refresh might be needed to see the changes.

This is a support issue, not something that can be fixed in core. Please continue with your topic on the forums: http://wordpress.org/support/topic/error-on-line-2-at-column-6-xml-declaration-allowed.

Note: See TracTickets for help on using tickets.