Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > DocumentTagGroupID not showing on posts View modes: 
User avatar
Member
Member
eagleag - 11/30/2011 6:17:32 PM
   
DocumentTagGroupID not showing on posts
I;ve created a Tag Group called "Blog".

I gave the blog master page in Properties-> Metadata -> Page tag group- > "Blog"

The posts that I craete inherit this but when I look in DB theyre DocumentTagGroupID is NULL.

Only if I go to each POST and change the INHERIT to actully choosing "Blog" tag group, then is updated DB with gtag group ID.

Beacuse right now isnt happening automaticlly I cant use the WHERE in repeater getting posts by tag.

Blog.aspx?tagname=test&groupid=0


any idea what issue is?

User avatar
Kentico Support
Kentico Support
kentico_janh - 12/1/2011 8:01:01 AM
   
RE:DocumentTagGroupID not showing on posts
Hello,

That's because the TagGroupID column in the CMS_Document table is only for non-inherited tag groups, but those values - you are looking for - are stored in different table -> CMS_Tag, so you can use your repeater, but the Where condition will be a little bit longer:

DocumentID IN (SELECT DocumentID FROM CMS_DocumentTag WHERE TagID IN (SELECT TagID FROM CMS_Tag WHERE TagName = 'test' AND TagGroupID = 0))


Best regards,
Jan Hermann

User avatar
Member
Member
eagleag - 12/1/2011 8:32:01 AM
   
RE:DocumentTagGroupID not showing on posts
Is there anyway for documents to inherit (blog, blog posts) TagGroupID?

User avatar
Member
Member
eagleag - 12/1/2011 8:34:04 AM
   
RE:DocumentTagGroupID not showing on posts
already have that in WHERE:

 ('{%tagid|(toint)%}' = 0 AND N'{%tagname%}'='') OR (DocumentID IN (SELECT DocumentID FROM CMS_DocumentTag WHERE TagID = {%tagid|(toint)%} )) OR (DocumentID IN (SELECT DocumentID FROM CMS_DocumentTag WHERE TagID IN (SELECT TagID FROM CMS_Tag WHERE TagName = N'{%tagname%}' AND TagGroupID = {%groupid|(toint)%} )))

User avatar
Kentico Support
Kentico Support
kentico_janh - 12/2/2011 1:35:44 AM
   
RE:DocumentTagGroupID not showing on posts
Hello,

What do you mean with "inherit (blog, blog posts) TagGroupID"? Do you mean, if document can belong to two different TagGroupIDs or if document can inherit some TagGroupID in a general way?

Best regards,
Jan Hermann

User avatar
Member
Member
eagleag - 12/2/2011 7:44:53 AM
   
RE:DocumentTagGroupID not showing on posts
the BLOG has tag group seelcted as "Blog" adn all post under inherit it. but when i create a post and add tags to it, once the post is published and I check the tag links, they show TagGroupID as 0 when it should 4/

User avatar
Kentico Support
Kentico Support
kentico_janh - 12/6/2011 2:13:04 AM
   
RE:DocumentTagGroupID not showing on posts
Hello,

Just to be clear, let's have the following document structure:

- My Blog
--- December 2011
----- My blog post

In the properties of the My Blog page you have set the Page tag group property to Blog, which has 4 as its TagGroupID.

The blog post My blog post inherits the Page tag group property from its parent and the Blog group is displayed in an uneditable grey field.

And if you look into the CMS_Tag table, you don't see number 4 in the row with the tag you filled in the blog post?

And if you now change the Page tag group to some other group in the My blog's properties, does the TagGroupID change its value in the CMS_Tag table for that inherited blogpost's tag?

Best regards,
Jan Hermann

User avatar
Member
Member
eagleag - 12/8/2011 3:57:25 PM
   
RE:DocumentTagGroupID not showing on posts
All my setting are as you say.

I even deleted all my post + deleted tag group and re-created all.

Now I still have issue

html:

.aspx?tagname=Minning&groupid=0">Minning</a>
.aspx?tagname=Europe&groupid=0">Europe</a>


Tables:
User image

Code in transformation

<%# BlogFunctions.GetDocumentTags(Eval("DocumentTagGroupID"), Eval("DocumentTags"), "~/Whats-you-take/RapFT-Blogum.aspx") %>


any idea how to solve issue?

Thanks

User avatar
Kentico Support
Kentico Support
kentico_janh - 12/12/2011 6:45:36 AM
   
RE:DocumentTagGroupID not showing on posts
Hello,

You didn't mention, that you are trying to get urls by using a transformation and the GetDocumentTags function and the reason, why the links are with a wrong GroupID is because your repeater (or any other web part using transformations) is on a different location than your blogposts, so you need to call this function with one extra parameter:

<%# BlogFunctions.GetDocumentTags(Eval("DocumentTagGroupID"), Eval("DocumentTags"), Eval("NodeAliasPath"), "~/Whats-you-take/RapFT-Blogum.aspx") %>


Best regards,
Jan Hermann

User avatar
Member
Member
eagleag - 12/12/2011 5:18:01 PM
   
RE:DocumentTagGroupID not showing on posts
got error:

[CMSDataProperties.LoadTransformation]: http://server/CMSTransformations/661de7e4-737f-4e18-988c-d1f2edc43c37/cms/blog/ra_postpreview.ascx(19): error CS1501: No overload for method 'GetDocumentTags' takes 4 arguments 

User avatar
Kentico Support
Kentico Support
kentico_janh - 12/13/2011 1:13:52 AM
   
RE:DocumentTagGroupID not showing on posts
Hello,

You probably don't have applied latest hotfix for the version 5.5 R2 of Kentico CMS, so please update your CMS with latest hotfix from following link:

http://devnet.kentico.com/Bugtracker/Hotfixes.aspx

Best regards,
Jan Hermann