Forums

NSXMLParserErrorDomain... Again

  1. So I can't get the bloody thing to work, and that just makes me hell-bent on getting the dang thing set up right. I've read through the other posts here and tried out various suggestions before polluting the forum with yet another NSXMLParserDomain thread. Mine is 9. The error code that is.

    Here's a bunch of stuff I have tried.

    • Since the error code seems to have something to do with XML I validated my feeds. They're fine.
    • I've tried disabling all plugins and switching to the default theme. No luck.
    • I've tested the XMLRPC with the HTTPClient and http://gggeek.raprap.it/debugger/ and to my feeble understanding of such things it seems to work fine. I got proper responses on all methods except "system.someMethod()" where someMethod is any method I tried with "system".
    • I ran phpinfo() to see if XML wasn't working right. Seems good. "XML Enabled" and a bunch of other uplifting reassurances. Seems everything is on.
    • I checked that wp_head() was present and moved it above all the plugin-code
    • .

    • I've reinstalled the iPhone app a handful of times.
    • I've overwritten every wp-file in the root, wp-include and wp-admin folders with pristine files from the latest .zip on wordpress.org
    • The iPhone app works fine with other blogs, including another that's located on the same server.

    There you have it. I'm at my wits end here, and despite my cavalier machismo in the beginning of this post I do sincerely want to get this to work. :/

    The blog is located at ctrloptcmd.com if that helps.

    Any ideas?

  2. The app uses system.listMethods to validate there is a real xmlrpc endpoint out there that will respond. That probably explains why you're unable to connect. There are other system.someMethod xmlrpc calls used in the runtime of the app to communicate with your blog.

    I don't know why the xmlrpc endpoint would respond to every method except system.someMethod -- I'll ping some WP core devs and ask if they know...

  3. Just to add a data point here, I get a valid response back from http://ctrloptcmd.com/xmlrpc.php for a system.listMethods request.

  4. ctrloptcmd,

    Ping back if you'd like to troubleshoot some more... Simplest is for me to watch variables in my debugger (or you can load the project into your XCode environment and observe...)

    If you'd like me to do so I'll need temp access to the blog... ping back and we can decide next steps...

  5. Hello again folks. Sorry I disappeared for a little while.
    Yes I am still very interested in working this out. I tend to get a little singleminded when issues like these pop up. Hence I have since last time completely deleted and reinstalled the blog. (2.9 now) It worked fine as long as it only contained the standard "Hello world" post from the WP install, but when I restored the database it failed again.

    So it seems that although my XML validates there is something murky in it. I just can't for the life of me figure out what it is. I also worry that if I fix whatever it is that's wrong here, the iPhone app will keep on crashing every time a line break tag isn't closed properly.

    If it'll help I'll grant you access jb6262. Just give me your email and let me know when you'll be having a peek. :)

  6. Further tests; Importing the posts into a completely clean install using the Wordpress XML method yields the same issue. Further proof that there is something in some post that bugs.

    If anyone has an idea what that something might be I guess I could look through my posts. But really; Can a malformed tag in a post be enough to crash the app?

  7. Ok. More "testing"...
    I manually reposted every single post to another WP-install. It still works. So to narrow it down; There's something in the database that borks things up, but it's NOT any of the post content. It's transferred both with a MySQL-restore and a Wordpress XML import.

    I'm very close to giving up and just start from scratch and repost all my posts, but it's damn irritating to not know what causes this.

    Oh. Maybe this helps: It seems Marsedit (which I used to repost the whole shebang) can read from my blog but not post to it. Might be related...

  8. Guys, I've tracked it down.

    In order to snipe this elusive bug I finally took several SQL exports before I wiped the server clean. I installed WP9 from scratch and meticulously imported data in chunks and reloaded the iPhone app for each step. When I came to the comments the bug hit.

    I then started wiping comments until I finally found the perpetrator. It seems "Alison" who had a question about Firebug hotkeys was to blame.

    Screenie of Alisons comment

    Look fine on the surface, so I ventured into the mysql.

    Screenie of the offending code.

    So Alison had most probably copy/pasted my URLEncoded special characters (⌃ ⌥ ⌘) from my post, and somehow this had not been sanitized before entering the database. Because of this old comment buried back in the archives the iPhone app refused to work.

    Note that my RSS was valid all along, possibly because this item was too old to show up in the feeds.
    Anyway. The bug is squashed, so I'm happy.

  9. Thanks for the excellent notes!

  10. Oh, no worries. I hope it might save someone else from going through that same ordeal.

    But I wonder why the special characters were allowed to remain un-encoded. Shouldn't WP have fixed that on the fly?

  11. Where the escaping really should be happing is when they are displayed or exposed, not before they go into the DB. The reason for that is the different escaping methods used depending on the context.

    The question becomes then, did this comment result in invalid XML for the XML-RPC response, or is the iPhone WP app XML parser choking on something it shouldn't?

  12. ctrloptcmd,

    Did you save a copy of the XML returned from the xmlrpc endpoint?

    The iPhone app uses Apple's standard framework for processing the XML - thus the NSXMLParserError error messages - so it may be that the XML was not ok, or there may be another explaination...

    If we have a copy we could run it through a validator and see what we find...

  13. I'm afraid I didn't.
    But I did save my backups, so I guess I could set up a dummy blog with the old posts and comments for you guys to sniff around in.

  14. Thanks - if it's relatively easy for you to do so, a dummy blog would make it possible for me to get a "snapshot" of an XML response from the endpoint which I could then run through a validator...

    That would likely answer the question of whether the app is choking on something it shouldn't...

    If you do set up a dummy blog, please drop me a line at john(at)johnbickerstaff(d0t)com with the url, username, and password and I'll start digging around...

Topic Closed

This topic has been closed to new replies.


About this Topic