August 7th, 2003

Goonies

Problem with userprops

I think this is a bug. If someone can confirm that this isn't just a site problem, I'll submit it to bugzilla.

I am having some issues updating certian userprops. In particular the ao1im field(and I am assuming all the other userprop fields), which lives in userprop. Every time I update it, it just enters a new row instead of updating the row that currently exists. I have tracked this down to this chunk of code in ljlib.pl

if ($db) {
my $vals = join(',', map { "($userid,$_->[0]," . $db->quote($_->[1]) . ")" } @$list);
$db->do("REPLACE INTO $table (userid, upropid, value) VALUES $vals");
}

Now I am not sure if this is just an issue with my mysql instlation, the version I am using (3.23.49 - I can handle upgrading), or the code.

For now I am having my users, remove the userprop, save, then update it and that seems to handle it just fine. Maybe we can change this back to the ghetto format of delte then insert or we can test to see if the prop exists, if so use an update, if not use an insert.
Brick

ColdFusion and XML

I'm developing an LJ Client with ColdFusion using the XML-RPC interface.

I sent this:
<?xml version="1.0"?>
<methodCall>
<methodName>LJ.XMLRPC.login</methodName>
<params>
<param>
<value><struct>
<member><name>username</name>
<value><string>test</string></value>
</member>
<member><name>password</name>
<value><string>test</string></value>
</member>
<member><name>ver</name>
<value><int>1</int></value>
</member>
</struct></value>
</param>
</params>
</methodCall>

And got this:
<?xml version="1.0" encoding="UTF-8"?><methodResponse><fault><value><struct><member><name>faultString</name><value><string>Application failed during request deserialization: not well-formed (invalid token) at line 1, column 26, byte 26 at /usr/lib/perl5/XML/Parser.pm line 185 </string></value></member><member><name>faultCode</name><value><string>Client</string></value></member></struct></value></fault></methodResponse>

What am I doing wrong?
  • Current Music
    Further Seems Forever - Justice Prevails (SonicBlaze: Indie, Punk, Emo, and Ska)