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.
Missing category entry with XMLRPC
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Missing category entry with XMLRPC
Hi!
Sounds more like a bug to me, there should beno entry in entrycat with a 0 categoryid!?
Regards,
Garvin
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/
# 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/
That's why I posted it in „Bugs“… 
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.
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:
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
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/
# 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/
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
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
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/
# 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/
I'm using ecto with the Movable Type API and the XMLRPC plugin 1.41.
And you're right, the part
is included. I'm confused…
And you're right, the part
Code: Select all
if (!is_array($entry['categories']) || count($entry['categories']) < 1) {
$entry['categories'] = array(0 => 0);
}Gelöst!
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.