Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Thomas Lee 38 posts 79 karma points
    May 14, 2015 @ 12:29
    Thomas Lee

    Server error: Failed to delete item 1080 (Template)

    Hi guys, 

    Not sure if anyone encountered this before. I deleted the DocumentType before deleting its template and i ran into this error...

    I have no idea how i can run a query to delete it from the database, i am using SQL CE. 

    Any kind souls care to help me out?




  • Charles Afford 1163 posts 1709 karma points
    May 17, 2015 @ 14:35
    Charles Afford

    You either need to remove the item from the database. Or create the doc type and then you will be able to delete the node. You might be able to do it thought the API

    You could use this SQL to do the job.


    03 DECLARE @Nodes TABLE (NodeId int) 04

    05 INSERT INTO @Nodes (NodeId) 06 SELECT top 1000 07 FROM cmsContent C 08 INNER JOIN cmsContentType CT ON C.contentType = CT.nodeId 09 INNER JOIN umbracoNode N ON C.nodeId = 10 WHERE CT.alias = '[Your Document Type Alias Here]' 11

    12 select id, [text] from umbracoNode where id in (select NodeId from @Nodes) 13

    14 delete from cmsPreviewXml where nodeId in (select NodeId from @Nodes) 15 delete from cmsContentVersion where contentId in (select NodeId from @Nodes) 16 delete from cmsDocument where nodeId in (select NodeId from @Nodes) 17 delete from cmsContentXML where nodeId in (select NodeId from @Nodes) 18 delete from cmsContent where nodeId in (select NodeId from @Nodes) 19 delete from cmsPropertyData where contentNodeId in (select NodeId from @Nodes) 20 delete from umbracoRelation where parentId in (select NodeId from @Nodes) OR childId in (select NodeId from @Nodes) 21 delete from cmsTagRelationship where nodeId in (select NodeId from @Nodes) 22 delete from umbracoNode where id in (select NodeId from @Nodes) 23

    24 DELETE FROM @Nodes 25


    charlie :)

Please Sign in or register to post replies

Write your reply to: