<Fault 500: 'Empty Term'> - taxonomies
Hi there, thanks for the lib!
Problem when using the example: http://python-wordpress-xmlrpc.readthedocs.org/en/latest/examples/taxonomies.html#terms : Or to create a child category:
for tl_cat in top_level_categories:
if tl_cat not in category_names:
child_cat = WordPressTerm()
child_cat.taxonomy = 'category'
child_cat.parent = 0
child_cat.name = tl_cat
child_cat.slug = slugify(tl_cat.lower())
child_cat.id = wp.call(NewTerm(child_cat))
results in
xmlrpclib.Fault: <Fault 500: 'Empty Term'>
any feedback would be appreciated!
Thanks
running against: WP 4.1.1
Please check the value of child_cat.name = tl_cat.
maybe it's worth empty.
Thanks, but its ok I've wrapped the database in a REST api which works quite well: https://github.com/rosscdh/wordpress_rest
On Tue, Mar 3, 2015 at 8:19 AM, Djie Sam Soe [email protected] wrote:
Please check the value of child_cat.name = tl_cat. maybe it's worth empty.
— Reply to this email directly or view it on GitHub https://github.com/maxcutler/python-wordpress-xmlrpc/issues/74#issuecomment-76898434 .
yesterday I had a similar case. but in my case that occurred as a result value is empty.
so I think it could help you, but it did not.
No problem I appreciate you taking the time mate thanks!
On Tue, Mar 3, 2015 at 8:32 AM, Djie Sam Soe [email protected] wrote:
yesterday I had a similar case. but in my case that occurred as a result value is empty.
so I think it could help you, but it did not.
— Reply to this email directly or view it on GitHub https://github.com/maxcutler/python-wordpress-xmlrpc/issues/74#issuecomment-76899551 .
I fixed it. The problem occurs (for me), when a tab/category is empty. So when you exclude empty valued, the problem disappears. For me it was somehing like
[i for i in tag_generator() if i]
Through the if i, empty values are excluded and it works now!