Im writing a .NET routine that creates and publishes a content node wich uses the tags datatype. Everything seems to work fine, except that the tags don't get published. However, they are saved and when i click the 'Save & publish' button manually, the tags do show up in the webpage.
I only asked about the version because I wanted to make sure I looked at the same version of the code you were running. The code *looks* right to me, at least what I see.
Is you txtTag list a comma seperated list of tags? Are there spaces after each tag but before the comma by any chance? Do the tags already exist? or are you trying to create them on save (you should be able to do either, but different code is in play).
Yes, the txtTag is a list of comma seperated tags without any spaces. They get saved to the document node, but don't show up on publish. (Some are new tags which are created fine, others already exist in other content nodes.)
It seems to be exactly the same problem as in the post you found... which is that the umbraco.config doesnt get updated...
Not sure if it will help, but if you have access to the DB, after you do the save, (but before you do the manual repulish), look into the cmsTags table and the cmsTagRelationship table and see if the rows are added properly. If you do not see the proper data in those two tables, it will be a clue anyway.
Thanks for the clue. But the tags are added properly to both cmsTags and cmsTagRelationship. I will have to dig a bit deeper into the problem when i find the time. I'll keep this post up to date.
Publish node with tags datatype
Hi guys,
Im writing a .NET routine that creates and publishes a content node wich uses the tags datatype. Everything seems to work fine, except that the tags don't get published. However, they are saved and when i click the 'Save & publish' button manually, the tags do show up in the webpage.
My code looks like this:
What version are you using?
I upgraded to 4.6.1 a couple of weeks ago... Could this be version related?
I only asked about the version because I wanted to make sure I looked at the same version of the code you were running. The code *looks* right to me, at least what I see.
This post from 5 months ago reported pretty much the same problem as you: http://our.umbraco.org/forum/developers/api-questions/12836-Tags-in-imported-blog-posts-are-not-set-correctly
Is you txtTag list a comma seperated list of tags? Are there spaces after each tag but before the comma by any chance? Do the tags already exist? or are you trying to create them on save (you should be able to do either, but different code is in play).
Hi, thanks for your time!
Yes, the txtTag is a list of comma seperated tags without any spaces. They get saved to the document node, but don't show up on publish. (Some are new tags which are created fine, others already exist in other content nodes.)
It seems to be exactly the same problem as in the post you found... which is that the umbraco.config doesnt get updated...
Not sure if it will help, but if you have access to the DB, after you do the save, (but before you do the manual repulish), look into the cmsTags table and the cmsTagRelationship table and see if the rows are added properly. If you do not see the proper data in those two tables, it will be a clue anyway.
Hi again,
Thanks for the clue. But the tags are added properly to both cmsTags and cmsTagRelationship. I will have to dig a bit deeper into the problem when i find the time. I'll keep this post up to date.
Chris
Did anyone ever figure this out? I'm having the same issue.
I'm having this issue in v6 - was a solution ever found?
I had this issue in 7.3 and the solution was to use SetTags instead of SetValue on IContent.
Like this:
is working on a reply...