Missing category entry with XMLRPC

Found a bug? Tell us!!
Post Reply
gimmel
Regular
Posts: 118
Joined: Tue Jul 25, 2006 2:44 pm
Location: Quickborn/Germany
Contact:

Missing category entry with XMLRPC

Post 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.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Missing category entry with XMLRPC

Post by garvinhicking »

Hi!

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

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
gimmel
Regular
Posts: 118
Joined: Tue Jul 25, 2006 2:44 pm
Location: Quickborn/Germany
Contact:

Post 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.
Last edited by gimmel on Fri May 09, 2008 7:07 pm, edited 1 time in total.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
gimmel
Regular
Posts: 118
Joined: Tue Jul 25, 2006 2:44 pm
Location: Quickborn/Germany
Contact:

Post 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?
gimmel
Regular
Posts: 118
Joined: Tue Jul 25, 2006 2:44 pm
Location: Quickborn/Germany
Contact:

Post by gimmel »

Meanwhile, can you tell me why setting the category to 0 has been removed again from the XMLRPC-Plugin?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
gimmel
Regular
Posts: 118
Joined: Tue Jul 25, 2006 2:44 pm
Location: Quickborn/Germany
Contact:

Post 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…
gimmel
Regular
Posts: 118
Joined: Tue Jul 25, 2006 2:44 pm
Location: Quickborn/Germany
Contact:

Gelöst!

Post 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.
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post 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.
Judebert
---
Website | Wishlist | PayPal
Post Reply