1

I have a situation where I have to find out those publication targets which are deleted some time back in order to unpublish those components/pages which are published and now they are not being unpublished and further not able to delete. (In this case publication targets are not known) I am using coreservice 2011/2013.

  • 1
    Uhm as far as I know it's not possible to delete Publication Targets while there are items published to them. So exactly how did you delete them? – Peter Kjaer Nov 18 '16 at 11:08
1

Well, As Peter K mentions in the comments it would be interesting to know how did you delete the Publication Targets.

But to fix your issue you can try:

  1. Get the Tcm Ids of the deleted Publication Targets (If somehow you can find those or you have it already)
  2. And then use Core Service to un-publish the items.

You can you below example function for it:

public void UnPublishComponent(string[] componentId, string[] targets, bool includeChildren)
        {
            UnPublishInstructionData pub = new UnPublishInstructionData();
            pub.ResolveInstruction = new ResolveInstructionData() { IncludeChildPublications = includeChildren, IncludeComponentLinks = false };

            PublishTransactionData[] pubTranData = tridionClient.UnPublish(componentId, pub, targets, PublishPriority.High, null);
        }
  • Thanks Saurabh. This I have already tried, but need to code, if I don't know the publication Targets. – Rahul Pal Nov 18 '16 at 12:31
  • Thanks for the reply Peter, Actually I have got this situation, don't know how the other team in my company which were earlier doing this task has deleted the publication targets. – Rahul Pal Nov 18 '16 at 12:33
  • 1
    Possibly DB hacking or they may have used some of the (many) "flaws" in the old COM API. – Nuno Linhares Nov 18 '16 at 15:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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