API Questions on Kentico API.
Version 6.x > API > TagCount not updated View modes: 
User avatar
Member
Member
CC - 7/19/2012 4:45:51 PM
   
TagCount not updated
It looks like the TagCount field is not being updated when I use
DocumentTagInfo info = new DocumentTagInfo(docID, tagID);
DocumentTagInfoProvider.SetDocumentTagInfo(info);

It *is* updated properly when I use
DocumentTagInfoProvider.AddTags(groupID, docID, tagList);

Should I not be using SetDocumentTagInfo(info)?

Thanks,
CC

User avatar
Certified Developer 8
Certified Developer 8
Jiveabillion - 7/20/2012 9:03:59 AM
   
RE:TagCount not updated
I've looked at the whole document tag thing when I needed to import a bunch of documents with tags.

The logic for adding tags seems to be all over the place. I don't understand why they decided that both spaces and commas would separate tags and require quotes to be placed around any tags with more than one word (this has caused consistency problems for many clients).

Because of this, I would say to use DocumentTagInfoProvider.AddTags because it has all of the logic in it that used when you save the tags in the frontend.

User avatar
Kentico Support
Kentico Support
kentico_zdenekc - 7/21/2012 8:27:31 AM
   
RE:TagCount not updated
You are right that the differences in behavior might be a little confusing and tricky.
I'm discussing this with our developers so we could optionally update the documentation or provide some recommended usage examples.

Any further suggestions how to improve this would be appreciated.

Thanks and regards,
Zdenek