6

I have some old code which sets the PublishedTo state of a page using old TOM whick looks a bit like this:

Page page = (Page)tdse.GetObject(uri, EnumOpenMode.OpenModeView, publication, XMLReadFilter.XMLReadAll);
page.SetPublishedTo(target, false, currentUser);

Is there a way to do this with core service? It seems like I need to use the PublishInfoData class, but I am not clear how to use this. Any guidance would be appreciated.

2 Answers 2

7

My understanding is that the SetPublishedTo method was hidden since Tridion 2011 since it was considered as a security gap in the API.

PublishInfoData is to be used with the GetListPublishInfo method which is readonly.

2
  • So are you saying this can't be done anymore? The docs for PublishInfoData say 'Gets or sets...' do you think this is a documentation error? Jul 24, 2013 at 14:58
  • It seems to be a documentation issue, since that API is not public anymore.
    – Eric Huiza
    Jul 24, 2013 at 15:32
3

Only the SDL Tridion Publisher service is allowed to change the published status of an item in Tridion, unless you use the COM API. CoreService and TOM.NET do not expose any public method to change this.

Given that the most common use case to need to change the published status of an item is when you shuffle things around and end up with items published to publication targets that either do not exist anymore or are not wired up to a given publication, we are looking into providing a "Decommission Publication Target" functionality in the near future - but at this point in time we're not considering changing the logic about who can change the published status of an item.

Given how much impact this setting has when republishing or unpublishing items, we do feel uncomfortable with external agents (i.e., not the Publisher) changing it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.