WordPress.org

Make WordPress Core

Opened 9 years ago

Closed 8 years ago

Last modified 8 years ago

#18332 closed defect (bug) (invalid)

Blank lines after ?> in wp-feed.php causes XML feed error

Reported by: alexbenfica Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.2.1
Component: Feeds Keywords: reporter-feedback close
Focuses: Cc:

Description

The blank lines after ?> in php files causes XML be misunderstood by feedburner or other feed "clients".

Fix is very easy: just cut the empty lines after the php tags in wp-feed.php and problem will be gone.

It would be interesting search these blank lines on other files as well.

This is the error: Fix wordpress rss feed error "Error on line 2: The processing instruction target matching "[xX][mM][lL]" is not allowed." while yo

This a portuguese blog that explains the error: http://www.dowordpress.com.br/erro-no-processamento-de-xml-feed-wordpress/

Change History (5)

#1 @dd32
9 years ago

  • Keywords reporter-feedback close added
  • Severity changed from critical to normal

A Single blank line after a closing ?> is striped/ignored by PHP, only multiple new line will be output.

The usual suspect here is Theme (functions.php) and/or Plugin files with multiple linebreaks outside of the PHP. WordPress Core doesn't output extra lines itself, and I just verified that myself.

Can you just check to see if it IS the linebreak from that file, or if its indeed from a plugin/theme?

#2 @alexbenfica
9 years ago

Hi!
I did a lot of teste in the last months with the default template and without plugins trying to solve this, but the problem was there.

Just today I could solve it in one of my sites removing those lines.

But... in another one of my sites, I changed the file and problem persists, even without plugins and orignal theme.

I thing that, just in case, all files should not have empty lines in the and... even because different webservers+PHP configurations can have diferent treatments for this detail.

#3 @SergeyBiryukov
9 years ago

Can't reproduce it either. wp-feed.php is not even used by core to generate a feed, it's deprecated and all it does is just a 301 redirect to the default feed URL.

#4 @RyanMurphy
8 years ago

  • Resolution set to invalid
  • Status changed from new to closed

Closing this as wp-feed.php was removed in r18540

#5 @SergeyBiryukov
8 years ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.