Orphan links in Kentico - cannot delete objects

Orphan links in Kentico - cannot delete objects

SQL to remove orphan links in Kentico

DECLARE @nodeIdsToDelete TABLE (NodeID int)

 

INSERT INTO @nodeIdsToDelete

SELECT NodeID FROM CMS_Tree

WHERE NodeID NOT IN (SELECT DocumentNodeId FROM CMS_Document)

AND NodeLinkedNodeID IS NULL

 

DELETE FROM CMS_DocumentAlias

WHERE AliasNodeID IN (SELECT NodeID FROM @nodeIdsToDelete)

 

DELETE FROM CMS_Tree

WHERE NodeID IN (SELECT NodeID FROM @nodeIdsToDelete)


    • Related Articles

    • Office 365 Training Center

      Click links below to go to site. Office 365 Training Center Outlook Training Videos OneDrive Training Videos Word Training Videos Excel Training Videos PowerPoint Training Videos OneNote Training Videos SharePoint Training Videos Microsoft Teams ...
    • How to create PDF interactive forms

      Purpose To create a PDF form which can be digitally filled out. Requirements Adobe Acrobat Pro DC must be installed on your computer. If it is not please raise a ticket. Instructions Open the form you wish to make interactive in Adobe Acrobat Pro DC ...