Make WordPress Core

Opened 16 years ago

Closed 14 years ago

#16485 closed enhancement (invalid)

XML-RPC Response Parsing Failed error caused by functions.php

Reported by: vtroia Owned by:
Priority: normal Milestone:
Component: General Version: 3.0.4
Severity: normal Keywords: reporter-feedback 2nd-opinion close
Cc: Focuses:

Description

I have several custom functions within my functions.php file. If there are spaces between the <?php declarations, the output of the xmlrpc.php page changes. A correct output of this page looks like this:
"XML-RPC server accepts POST requests only."

If there are spaces in the functions.php file, the output looks like this:
"
XML-RPC server accepts POST requests only.
"

The extra space throws off programs like Mars Edit and other blog editing tools (I believe windows live editor, too).

Attachments (1)

TextMate1.png​ (63.3 KB ) - added by vtroia 16 years ago.

Download all attachments as: .zip

Change History (11)

#1 @SergeyBiryukov
16 years ago

There should not be any extra spaces like that. It's not the only problem with them. You might as well see “headers already sent” messages, problems with RSS feeds or other issues.

#2 @hakre
16 years ago

Related: #12089

#3 @hakre
16 years ago

Please install the following plugin and test if it works:

​Theme Napkin v0.1 (Wordpress Plugin) - Safeguard unintended output generate by theme bootstrap code (functions.php).

To install it, create/unpack the file theme-napkin.php into your plugin directory.

In case you have WP_DEBUG enabled, it will trigger an error so it makes the problem more visible.

#4 follow-up: @miqrogroove
16 years ago

It's very easy to check for that and throw an error. A similar check on config.php and any other commonly edited file should be considered if such errors are desirable. Picking just one file like functions.php isn't going to solve the problem. On the other hand, it could be quite a slap in the face to do an upgrade and find out that your theme wont even load.

#5 in reply to: ↑ 4 @hakre
16 years ago

Replying to miqrogroove:

On the other hand, it could be quite a slap in the face to do an upgrade and find out that your theme wont even load.

Plugin activation is related here I think.

#6 @hakre
16 years ago

  • Keywords reporter-feedback added

#7 @miqrogroove
16 years ago

Anyway, there is no bug here. This ticket should be closed or changed to some kind of feature request.

#8 @hakre
16 years ago

  • Type defect (bug) → enhancement

#9 @hakre
16 years ago

  • Keywords 2nd-opinion close added

Not much traction, not much to fix on a working site.

#10 @nacin
14 years ago

  • Milestone Awaiting Review
  • Resolution → invalid
  • Status new → closed
Note: See TracTickets for help on using tickets.