Ticket #108 (closed defect: wontfix)

Opened 4 years ago

Last modified 4 years ago

I get an XML Parsing Error whenever i got to my journals rss feeds

Reported by: anonymousbugger Assigned to: ryan
Priority: normal Milestone:
Component: XML-RPC Version: 1.2
Severity: critical Keywords:
Cc:

Description

Whenever i click on the rss feeds for journal and comments i get an error message and i can't get it fixed. This is preventing bots and other things from indexing my journal. The error is displayed below. XML Parsing Error: xml processing instruction not at start of external entity Location: http://chenu.uni.cc/wp-rss2.php Line Number 1, Column 2: <?xml version="1.0" encoding="utf-8"?> -

Attachments

0000108-wp-rss2.php (1.8 kB) - added by anonymousbugger on 05/21/05 06:26:52.

Change History

06/21/04 17:47:22 changed by anonymousbugger

06/21/04 18:03:08 changed by Sebbi

What programm are you using? I had a similar problem with IE 6.0 am german "umlauts" ...

06/21/04 18:09:47 changed by michel v

This is not about umlauts. It's about <?xml being preceded by a space character.

Make sure you're using the wp-rss2.php file from a fresh install and that you did not edit it in any way.

06/22/04 11:33:27 changed by davidhouse

It seems that something, somewhere, is echoing a space before the <?xml ?> processing entity. Have a look through your wp-blog-header.php file, that's the only other file being included.

Or, if you have a particulary strict PHP running on your server, it could be the line break before the line

<?php echo '<?xml version="1.0" encoding="' . $charset . '"?'.'>'; ?>

on line 13.

edited on: 06-22-04 16:33

07/07/04 12:52:54 changed by anonymousbugger

Patch for that bug:

sh-2.05b# diff --rcs wp-rss2.php wp-rss2.php.patched d12 2 a13 1 echo '<?xml version="1.0" encoding="' . $charset . '"?'.'>'; ?>

This occurs in several of the xml generating files.

07/08/04 14:32:55 changed by lowmagnet

(I added the previous bugnote as well)

I removed the extra line-feed in the rss2 file (and all others using this same code) and it still is placing a line-feed in the content before that point. I'm tracking the code through the all of the various includes/requires to track this further.

OK, I found that the 'weekday' plugin was also adding a new-line character. All plugin developers should probably be informed that adding new-lines in their code (usually by ending or starting their main php with a trailing or leading new-line) can screw up xml parsing.

edited on: 07-08-04 14:42

07/08/04 15:18:51 changed by matt

I get this error when visiting that URI:

Warning: Unknown(): Unable to access c:\domains\chenu.uni.cc\wwwroot\wp-rss2.php in Unknown on line 0

Warning: Unknown(c:\domains\chenu.uni.cc\wwwroot\wp-rss2.php): failed to open stream: No such file or directory in Unknown on line 0

Warning: Unknown(): Unable to access c:\domains\chenu.uni.cc\wwwroot\wp-rss2.php in Unknown on line 0

Warning: Unknown(c:\domains\chenu.uni.cc\wwwroot\wp-rss2.php): failed to open stream: No such file or directory in Unknown on line 0

Warning: (null)(): Failed opening 'c:\domains\chenu.uni.cc\wwwroot\wp-rss2.php' for inclusion (include_path='.;c:\php\includes') in Unknown on line 0

Anyway this error is probably related to a bad plugin.

edited on: 07-08-04 15:25

12/09/04 02:48:47 changed by ryan

  • owner changed from anonymous to rboren.
  • status changed from new to closed.
  • resolution changed from 10 to 70.

02/04/05 22:06:59 changed by anonymousbugger

  • status changed from closed to assigned.
  • resolution changed from 70 to 30.
  • Patch set to No.

I am running Win2K, php version 4.3.9, MySQL version 4.0.18, wordpress version 1.2.2

Neither of the following files will open in firefox0.8 and NS7,

wp-rss2.php wp-commentsrss2.php

I get the following error message:


"XML Parsing Error: xml processing instruction not at start of external entity" Location: ... wp-rss2.php Line Number 2, Column 1: <?xml version="1.0" encoding="utf-8"?>


No error is produced in IE6 or Opera7.

I have searched the wordpress support forums and see that this is not an uncommon problem. I have tried to find a way to remove the space before "<?xml" but being brand new to php, really do not understand enough about php coding to get very far at all. I do not see a solution that I understand listed there.

I hope this is enough but not too much information.

-ejm

edited on: 02-04-05 22:12

02/05/05 10:34:41 changed by anonymousbugger

I located a fix for this in the wordpress support forums http://wordpress.org/support/topic.php?id=13097


for rss2 - open the file wp-rss2.php from the wp root for commentsrss2 - open file pwp-commentsrss2.php from wp root

find

header('Content-type: text/xml', true);

and replace with

header('Content-type: application/xml', true);


This has resolved the problem for wp-rss2.php and wp-commentsrss2.php and this issue is now mostly resolved. Thank you.

-ejm

edit: the fix does not appear to work for wp-rss.php

edited on: 02-05-05 10:35

edited on: 02-05-05 10:46

02/12/05 07:14:28 changed by matt

  • status changed from assigned to closed.
  • resolution changed from 30 to 50.

Without fail this is ALWAYS due to a plugin extra whitespace or whitespace in a user-edited file like wp-config.php.

05/21/05 06:26:52 changed by anonymousbugger

  • attachment 0000108-wp-rss2.php added.