Problems viewing and adding vocabulary terms

coynea - December 13, 2008 - 07:19
Project:Windows Live Writer BlogAPI
Version:6.x-1.3
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs review
Description

I am using tac_lite for vocabulary-based access control, and was running into a few problems: first, my vocabulary terms with restricted access were not showing up in WLW's categories list. Second, when I specified one of the terms from my tac_lite vocabulary, instead of adding that existing term, it would add the term to my other vocabulary, which allows free tagging. And third-- although I had marked my tac_lite vocabulary as Required, I was able to create posts through WLW without providing a term from that vocabulary. Attached is a patch to fix these issues.

To fix problem number one, it authenticates the user in wlw_blogapi_metaweblog_get_category_list, so that users will see all the vocabulary terms they have access to.

To fix the second problem, it checks each term to see if it exists in an available vocabulary. If so, it uses that existing term; if not, it adds it to the first available free-tagging vocabulary, as before.

To fix the third problem, it keeps a list of required vocabularies, removing them from the list as they are used.

I changed _wlw_blogapi_mt_extra to return error messages, which are passed to wlw_blogapi_error, so that it can report if no terms were provided in a required vocabulary, or if a free tag was used but no free-tagging vocabulary was available, and the errors can be seen from WLW.

AttachmentSize
wlw_blogapi-vocabulary-handling.patch2.69 KB
 
 

Drupal is a registered trademark of Dries Buytaert.