Brady J. Frey

Search bradyjfrey.com
Search my site

XML error for WordPress iPhone

Full Article:

I was attempting to add my blog, and my various corporate blogs, to the recent WordPress iPhone Application but kept getting the following error:

“XML-RPC Service for you blog cannot be found”

The Support Page alluded to a missing XML tag, but did little to answer how to fix your templates (and switching to a classic template allowed my blog to sync just fine), but didn’t offer a solution. It’s easier than you think, and there’s a couple ways to do this:

  1. Edit any header files you use on your WordPress theme (could be the default header.php or multiple custom ones like me), and add the following above your closing head tag (the </head> tag): <?php wp_head(); ?>
  2. Go to your Appearance page in your blogs Admin, (as of WordPress 2.7) and select one of the default themes. Activate that theme, then connect your iPhone. Once you’ve connected, you can switch right back.

Make sure that you have XML-RPC check boxed in your Settings > Writing Panel for XML-RPC to work! All the iPhone app needs is the ability to find, in your code, that unique XML ‘edituri’ address for it’s records. Once it’s there, it won’t check again. Enjoy!

Update: for those of you with continued issues (possibly from not using the wp head template tag by choice, where I use html instead of xhtml), make sure your rel=”EditURI” is spelled exactly that way. By exactly, I mean with that same capitalization, or else the app will not read it

Similar Posts

Published

12 Reader Comments::
  1. 1 Al says:

    Thanks for this! I was able to get my blog to work with the app by following your very easy and simple instructions. Thanks again!

    Now to get the app to see all of my pages. Not just two of them. Pressing the refresh button does not help at all.

  2. 2 Brady J. Frey says:

    I’ve had that problem on some sites, and it seems to be a bug in the WordPress app. I was going to check the settings, but my app keeps crashing on a recent site addition! I’m guessing they still have a few bugs:)

  3. 3 Bob Benz says:

    Great tips. Worked like a charm. Thanks much for posting this.

  4. 4 Joseph Scott says:

    Any theme not calling wp_head(); in the header should be considered broken. Make sure you let the original theme author know that it was missing from their theme.

  5. 5 Al says:

    Joseph,
    I agree with you about a theme being broken if the wp_head(); is missing. But in my case, and maybe in others, the part that was extremely helpful was to temporarily pick on of the default word press themes and then switch back to the them that you are going to use. That is what did the trick for me.

  6. 6 Brady J. Frey says:

    @Joseph Scott
    The only reason I don’t call wp_head(); in some designs, is simply because it outputs XHTML when I prefer HTML strict in most of my work (yeah, one of those purists). I’ll be happy the day I can output HTML without calling some funky PHP to recode:)

  7. 7 Joseph Scott says:

    @Brady J. Frey -

    The doctype issues are beyond the scope of this particular discussion. You need to be aware that not calling wp_head() in your theme essentially makes your theme broken. Take a look at wp-includes/default-filters.php and you’ll see that a large number of things depend on the wp_head action happening. Without that you risk having numerous items break, like the WP iPhone app for staters, which is why we’re having this conversation in the first place :-)

  8. 8 Brady J. Frey says:

    @Joseph Scott
    Yeah, I’ve taken a look at it and… cough… hacked it on occasion which I probably shouldn’t have done:). I’ve only done it in context of some heavily reworked wordpress sites that I had no value of plugins anyhow, or in the case of having to explain to the 3 entry level designers I manage why it’s breaking code when I told them not to break code.

  9. 9 Mettez à jour qu’ils disaient… says:

    [...] du 07/04/2009 : Ça remarche !! :) J’ai trouvé la solution là, il suffisait de rajouter un bout de code (<?php wp_head(); ?> pour ne pas le citer) dans le [...]

  10. 10 Dylan says:

    Thanks for this! Worked like a charm!

  11. 11 darryl ramm’s blog » WordPress Upgrade and iPhone WordPress App says:

    [...] found my solution  here. Then I checked the header.php file in my current themes folder and made sure there was a <?php [...]

  12. 12 をぢの日記 » Blog Archive » 【iPhone_App】 Wordpress iPhone Appが XML-RPC エラーで登録できない問題 says:

    [...] XML Error for WordPress iPhone [...]

Your thoughts:
Tell us what you think: