Page 1 of 1

Missing category entry with XMLRPC

Posted: Sat Feb 16, 2008 11:41 am
by gimmel
If I generate a post with the admin interface, there will be database entries in serendipity_entries AND in serendipity_entrycat, even if there's no category set (category 0).
If I do the same via XMLRPC, serendipity_entrycat will only get an entry if there's a category selection.
So, for every post I make with XMLRPC I have to go to the admin interface and save this entry to get a proper serendipity_entrycat entry.

Re: Missing category entry with XMLRPC

Posted: Sat Feb 16, 2008 1:22 pm
by garvinhicking
Hi!

Sounds more like a bug to me, there should beno entry in entrycat with a 0 categoryid!?

Regards,
Garvin

Posted: Sun Feb 17, 2008 10:43 am
by gimmel
That's why I posted it in „Bugs“… :wink:
I thought the bug was generating no category 0 with XMLRPC.

I use it to prevent some categories from showing up with „Kategorie als Startseite”. All posts with no category (0) are visible, only special categories like „list of wishes“ are hidden and can only be reached by choosing the special category. (http://www.dreikaisers.de)
I had to change a line of code in „functions_entries.inc.php”, but it works very well.

Posted: Mon Feb 18, 2008 10:08 am
by garvinhicking
Hi!

Hm, nice use of the "0 category" thing. I now do see in code the place where we insert it. I agree that the XMLRPC-interface should deal with it identically, I hope it introduces no other problems. I've just committed that change to the plugin, it should be available within 48 hours.

Regards
Garvin

Posted: Fri May 09, 2008 7:25 pm
by gimmel
Hi Garvin,
thanks for changing the plugin behaviour. It worked very well, but after installing the last XMLRPC-Plugin update it doesn't work anymore. Any Hint?

Posted: Sun Jun 15, 2008 4:52 pm
by gimmel
Meanwhile, can you tell me why setting the category to 0 has been removed again from the XMLRPC-Plugin?

Posted: Mon Jun 16, 2008 12:44 pm
by garvinhicking
Hi!

It has not been removed, it should still be there:

http://php-blog.cvs.sourceforge.net/php ... 22&r2=1.23

Which RPC client do you use, with which API? MT or Blogger?

Regards,
Garvin

Posted: Mon Jun 16, 2008 12:58 pm
by gimmel
I'm using ecto with the Movable Type API and the XMLRPC plugin 1.41.
And you're right, the part

Code: Select all

if (!is_array($entry['categories']) || count($entry['categories']) < 1) {
     $entry['categories'] = array(0 => 0);
}
is included. I'm confused…

Gelöst!

Posted: Tue Dec 02, 2008 11:05 am
by gimmel
Ecto schlägt für Serendipity die MovableType-API vor. Ich habe jetzt auf die MetaWeblog-API umgeschaltet und keine Probleme mehr. Die Beiträge erscheinen nun direkt nach dem Senden, ohne dass ich sie im Admin-Interface noch einmal neu speichern muss.

Posted: Tue Dec 02, 2008 9:37 pm
by judebert
So it works when you select MetaWeblog as the API type? That suggests we could find a difference between the two in our XML-RPC code.