Bug reports Found a bug? Post it here please.
Version 4.x > Bug reports > API - TagInfoProvider.GetTags(taggroupname, siteid, where, order, topN) method View modes: 
User avatar
Member
Member
matthew.lee-reedbusiness.com - 4/3/2009 7:26:47 PM
   
API - TagInfoProvider.GetTags(taggroupname, siteid, where, order, topN) method
Hi,

I tried to use below method to pull tags from database.

TagInfoProvider.GetTags(taggroupname, siteid, where, order, topN)

It threw error because the dynamic sql query behind this method was incorrect. "Top N" has to place after they keyword "DISTINCT".

SELECT TOP 10 DISTINCT CMS_Tag.TagID, TagName, TagCount
FROM CMS_DocumentTag
JOIN CMS_Tag ON CMS_DocumentTag.TagID = CMS_Tag.TagID
JOIN CMS_TagGroup ON CMS_Tag.TagGroupID = CMS_TagGroup.TagGroupID
WHERE (
DocumentID IN ( SELECT DocumentID FROM View_CMS_Tree_Joined
WHERE (TagGroupName = 'Content' AND TagGroupSiteID = 1)))

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 4/7/2009 2:56:17 AM
   
RE:API - TagInfoProvider.GetTags(taggroupname, siteid, where, order, topN) method
Hi,

Thank you for the report, we are already aware of this bug. I am sorry for the inconvenience. We will fix it in the nearest version.

This problem occurs only if the site name, where and order by and top N properties are set.

Best Regards,
Juraj Ondrus

User avatar
Member
Member
matthew.lee-reedbusiness.com - 4/7/2009 7:26:37 PM
   
RE:API - TagInfoProvider.GetTags(taggroupname, siteid, where, order, topN) method
Good. Thanks.