Does ISHRemote only see a Document Object if it has object, version and language layer present?

Hi,

I am still researching and trying to understand the workings of ISHRemote for manipulating objects in Tridion Docs.

While testing various calls to Get-IshDocumentObj it appears to sometimes remove only the language layer of a document object.

When I view the document object in Tridion Web Client I can still see the Object and Version layer. However, when I test further attempts to get or remove this object view ISHRemote, it doesn't find it.

Can anyone explain the visibility of a topic object in Tridion Web Client that cannot be seen via call to Get-IshDocumentObj using ISHRemote?

Any feedback appreciated,

Regards,

Ann

Parents
  • Hi Ann,

    We love facts here... can you describe exactly what you see in the web client (screenshot). What code you are triggering (with which FilterMetadata and RequestedMetadata parameters, etc)? And describe the actual result you get, and then the expected result?

    ISHRemote only offers full logical-version-language objects.

    Best wishes,
    Dave

  • Hi Dave,

    I have just discovered that this problem that I am having seems to be influenced by a topic that has the DITA <draft-comment> element in it. If I leave this element in the topic I get the following 3 issues:

    1. An error on importing the DITA content via the Content Importer (this is how I am getting it into Tridion Docs)

    2. An extra folder called Topics is generated within the main Topics folder in Tridion :-|

    3. The other topic object (Training Instructions) remains in the CMS but without a version or language layer

    If I remove this <draft-comment> element, everything imports fine and my PowerShell script works perfectly and removes everything.

    This all seems very odd to me but it might ring a bell with you or someone else reading this?

    Regards,

    Ann

  • Thanks Ann - I would not point at the <draft-comment> as the culprit. From the picture I would derive that your "Reference" topic was used (so some xref or href is pointing to the LogicalId GUID of your "Reference") by another topic. The system would block you from deleting the "Reference" topic, as it was still being used by other topics that you didn't delete yet. So it looks like you are running into referential integrity here, although your intention is to remove all.

    Looking at github.com/.../RemoveIshDocumentObj.cs, that logical-level-only "Reference" from your screenshot cannot be deleted by ISHRemote cmdlets. It can be deleted over the API however.

  • Hi Dave, 

    I am back to this problem again and yes I can see the xref in topic1 referencing topic2 and resulting in topic2 object layer not being removed after call to Remove-IshDocumentObj.

    So if I want to complete this code to remove the entire topic (language, version and object layers) then I need to use the API.

    Can you advise if I can call the API from the same PowerShell script that I have been building so far (with ISHRemote cmdlets) or do I need to wrap it all in a program developed in another language e.g. Java?

    Any advice appreciated,

    Regards,

    Ann

  • Hi Ann,

    The WCF proxies are available for a direct API call, so security/authN is already handled :-)

    $ishSession = New-IshSession -WsBaseUrl https://ish.example.com/ISHWS/ -PSCredential admin
    $ishSession.DocumentObj25.Delete("MyLogicalIDGUID", "", "", "", "")

    On how the function looks like, see https://docs.sdl.com/796504/421408/sdl-tridion-docs-14-sp2/documentobj-2-5-delete The above code tries to remove the whole object all logical/version/language still respecting referential integrity, so perhaps you need a loop to try again. 

    I didn't test the sample as I didn't have a database which I could delete in handy :-) 

    -Dave

  • Hi Dave,

    Thanks for your reply. I see the docs for the function says "Delete Will Fail...if the map is referenced by another map". How does this differ to calling ISHRemote cmdlet Remove-IshDocumentObj?

    When I test and call $ishSession.DocumentObj25.Delete it seems to only remove the language layer whereas Remove-IshDocumentObj removes both the language and version layer. Whatever way I try to delete a topic that is referenced from elsewhere, once the language layer is gone then the logical / object layer isn't seen by ISHRemote so I cannot do any further processing to something that is invisible. 

    Am I trying to do the impossible here or is there some way to achieve this?

    Also, I seem to be getting very few responses on my questions and wonder if there is another forum/site that community members use?

    Thanks in advance,

    Ann

Reply
  • Hi Dave,

    Thanks for your reply. I see the docs for the function says "Delete Will Fail...if the map is referenced by another map". How does this differ to calling ISHRemote cmdlet Remove-IshDocumentObj?

    When I test and call $ishSession.DocumentObj25.Delete it seems to only remove the language layer whereas Remove-IshDocumentObj removes both the language and version layer. Whatever way I try to delete a topic that is referenced from elsewhere, once the language layer is gone then the logical / object layer isn't seen by ISHRemote so I cannot do any further processing to something that is invisible. 

    Am I trying to do the impossible here or is there some way to achieve this?

    Also, I seem to be getting very few responses on my questions and wonder if there is another forum/site that community members use?

    Thanks in advance,

    Ann

Children
No Data