Categories
Linux / Gentoo Linux

Fixing XML-RPC’s in KDE4

After posting that Bilbo worked out of the box, I was bound to run into a world of trouble – and so I did

You see, when I was trying out KBlogger, I ran into the “Invalid request payload xmlrpc element STRING cannot be child of DATA” error you find in some KBlogger related posts. After playing around a little I realised that the error prevented me from posting anything and I ditched KBlogger as being buggy as hell (which it actually still is).

But when I installed Bilbo, I ran into the same problem! Only this time I knew that it should work as I posted before using Bilbo. After investigating a bit I found the culprit: KBlog. This backend library handles the communication with the server over the XML-RPC protocol. The error is produced on the server side and to be exact it is PHP XML-RPC that generates the error.

Because the XML-RPC library on the server is very strict (and probably error free), I turned to see what Bilbo actually sent to the server. The problem appears to be in the category structure that is generated. In my first posting, I did not select a category to post to. But when you select one or more categories, a QStringList object is populated with the category names. This is converted into XML somewhere in KDE (I haven’t figured out where yet).

After talking to the Bilbo devs for a bit they pointed me to the WordPress API in KBlog. For some reason, that one generates a string holding the XML for the server. And in that class, the metaWeblog.newPost function is called using a properly constructed category array.

Alas, switching to the WordPress API did not help: “STRUCT cannot be child of PARAM” and whether I used categories or not, the error remained. A quick inspection showed where that error comes from: the ‘struct’ element should not be directly put inside a ‘param’ element. The XML-RPC specifications state that the ‘struct’ should be placed in a ‘value’ element first. After fixing this and recompiling Bilbo, everything is working now!

Well, not everything as the metaWeblog API is still broken. I have filed a bug report with KDE upstream so they can add my fixes to the WordPress API and hopefully someone with more KDE programming experience can fix the metaWeblog API. Or rather, fix the conversion from a QStringList to proper XML-RPC compatible XML.

On a side note: while debugging the XML-RPC protocol I discovered that the Joomler XML-RPC plugin for Joomla! did not apply the categories that are sent along. I’ve modified my (already heavely patched) version of Joomler and once I’ve tested it a bit more, I’ll send the patches to the Joomler devs. Hooray for open source I guess ^^.

Categories
How-To's

SATA Hard disc showing up as a Removable Drive

After spending the better part of a day trying to reinstall my neighbors computer using his old Windows XP Home disc (no service packs installed) and burning 4 slip-streamed discs – in an attempt to get the pesky nForce4 controller on the ECS motherboard to play nice – I finally got the system up and running again. Mind you, not using the custom Windows XP CD’s. No, for some reason after the slip-stream, the CD key is no longer accepted (thanks Microsoft for that one).

No, the reinstallation involved the slow and painful upgrade of Windows XP from the vanilla version to SP3 with every upgrade known to man. Of course this process failed once when I tried installing every driver and tool during eachothers installation (and probably during the service pack upgrade) so I wound up with a system which threw a BSOD on each boot and forced me to start all over again. *grmbl*

Now, after everything is up and running again, the only problem that remained was the fact that the SATA hard drive is showing up as a Removable disc. This is probably because the initial installation was using a legacy IDE emulation interface on the nForce4 controller. But as soon as I installed the SATA driver, the full 250GB became available (it showed up as a 128GB disc during the text mode setup) and Windows switched to the faster SATA interface.

My guess is that Windows for some reason now detects the SATA drive as a new drive and assumes for some reason that it is hot-swappable (it should be in theory but still should not show up as such). To fix this, you need to tell the nVidia drivers to stop marking SATA drives as removable. As such, the trick described below might not work if you do not have a nForce SATA controller.

WARNING: Messing with the registry can destroy your Windows installation. If you know what you are doing you should be fine, if not, please stop now.

  • Go to ‘Start’
  • ‘Run’
  • Type ‘regedit’ and hit enter
  • Find the following folder ‘HKEY_LOCAL_MACHINE\CurrentControlSet\Services\nvata’
  • Some people might have a 64-bit installation, they should have a ‘nvata64’ folder instead
  • On another computer of mine, the folder was called ‘nvatabus’ instead of ‘nvata’
  • Create a new DWORD value in this folder (by right clicking and selecting ‘New DWORD value’)
  • Name the new value ‘DisableRemovable’ and set the value to 1 (decimal or hex doesn’t matter)
  • Close RegEdit and reboot your computer

If everything worked out, you should no longer see the hard disc showing up as a removable device. Don’t forget to reboot to make the changes active!

Categories
Japan Blog Study Tour

Thundering Silence

IMG_3349 To cover the silence I’ll post something on here right now (at gunpoint from my sister). Thanks to the right down crap internet (or rather no internet at all most of the time) I was forced to stop uploading pictures to my site and upload stories as well. Not to worry, most of the adventures of the idiot in Japan are safely stored on this computer but I now finally have the time to finish writing the stories and adding pictures to them (it helps to actually move them from the camera to the computer – d0h).

Right now I’m finishing up last weeks things and hopefully I’ll be able to post the stories from Hiroshima onwards within a day. Actually I’m typing this from my hotel chamber which has no internet connection as well (sigh). We found a Yahoo internet cafe at the 3rd floor though so with a bit of luck I’ll be able to upload at least this message.

On a side note: the raptor above is not a mockup toy but a real walking mecha – if you wanna find out more stay tuned ^_^.