Make WordPress Core

Opened 14 years ago

Closed 12 years ago

#16485 closed enhancement (invalid)

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

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

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 14 years ago.

Download all attachments as: .zip

Change History (11)

@vtroia
14 years ago

#1 @SergeyBiryukov
14 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
14 years ago

Related: #12089

#3 @hakre
14 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
14 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
14 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
14 years ago

  • Keywords reporter-feedback added

#7 @miqrogroove
14 years ago

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

#8 @hakre
14 years ago

  • Type changed from defect (bug) to enhancement

#9 @hakre
14 years ago

  • Keywords 2nd-opinion close added

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

#10 @nacin
12 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.