I have created a Tag editor, that can edit and delete tags from the database (both the tag and the node relation). Now, the tag will stay in plain text on the node, that it was once published to and I can first get it removed or renamed once I republish the node in the cms ui.
When I try to republish the nodes via API after deleting the tags and relation in the database I experience it to be both very slow and also not to update the tags.
foreach (int nodeId in nodeIds) { Document doc = new Document(nodeId); doc.Publish(u); umbraco.library.UpdateDocumentCache(nodeId); }
I figure I am doing something wrong or forgetting something?
Well that umbraco.cms.businesslogic.Tags class will only manipulate the tags and relations in the database. We need to also republish the affected nodes. It seems that my code above will actually republish those nodes, but changes to the tags aren't made. I suspect, that the cms ui does something else to push the correct tags to the nodes that has nothing to do with Document publish?
Removing tags from node via API
Hi
I have created a Tag editor, that can edit and delete tags from the database (both the tag and the node relation). Now, the tag will stay in plain text on the node, that it was once published to and I can first get it removed or renamed once I republish the node in the cms ui.
When I try to republish the nodes via API after deleting the tags and relation in the database I experience it to be both very slow and also not to update the tags.
I figure I am doing something wrong or forgetting something?
/Simon K
(where nodeIds is a list ids of the nodes priorly tagged with the now changed or deleted Tag)
Anyone?
I wonder if anyone can answer my question or at least give me a hint?
Yup,
check out umbraco.cms.businesslogic.Tags
best regards
Thomas
Well that umbraco.cms.businesslogic.Tags class will only manipulate the tags and relations in the database. We need to also republish the affected nodes. It seems that my code above will actually republish those nodes, but changes to the tags aren't made. I suspect, that the cms ui does something else to push the correct tags to the nodes that has nothing to do with Document publish?
is working on a reply...