Saturday 23 July 2011

Umbraco empty recycle bin hangs

So after crawling through forums I found a solution. The issue is to do with stray nodes.

Run this script and all your problems go away:


DELETE FROM umbracoNode
WHERE
(
id IN
(
SELECT umbracoNode_1.id
FROM umbracoNode AS umbracoNode_1 CROSS JOIN cmsContent
WHERE (umbracoNode_1.nodeObjectType = 'C66BA18E-EAF3-4CFF-8A22-41B16D66A972'
)
AND
(
umbracoNode_1.id NOT IN
(
SELECT nodeId
FROM cmsContent AS cmsContent_1
)
)
)
)



Update:
If that doesnt work you can also try this:


2 comments:

  1. Perfect. I hate stray nodes. This saved my day!

    ReplyDelete
  2. Forgive my ignorance I have this problem also but how do I run this script. I would like to try it on my test server first and then if successful my main server. Relatively new to Umbraco so want to make sure I have everything before proceeding. Thanks for the help

    John

    ReplyDelete