WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 20 months ago

#16485 closed enhancement (invalid)

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

Reported by: 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 3 years ago.

Download all attachments as: .zip

Change History (11)

vtroia3 years ago

comment:1 SergeyBiryukov3 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.

comment:2 hakre3 years ago

Related: #12089

comment:3 hakre3 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.

comment:4 follow-up: miqrogroove3 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.

comment:5 in reply to: ↑ 4 hakre3 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.

comment:6 hakre3 years ago

  • Keywords reporter-feedback added

comment:7 miqrogroove3 years ago

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

comment:8 hakre3 years ago

  • Type changed from defect (bug) to enhancement

comment:9 hakre3 years ago

  • Keywords 2nd-opinion close added

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

comment:10 nacin20 months ago

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