delete from cmsPreviewXml where nodeId in (select id from umbracoNode where trashed = '1') delete from cmsContentVersion where contentId in (select id from umbracoNode where trashed = '1') delete from cmsDocument where nodeId in (select id from umbracoNode where trashed = '1') delete from cmsContentXML where nodeId in (select id from umbracoNode where trashed = '1') delete from cmsContent where nodeId in (select id from umbracoNode where trashed = '1') delete from cmsPropertyData where contentNodeId in (select id from umbracoNode where trashed = '1') delete from umbracoNode where trashed = '1'
I cleaned it up using the -20 checks but unfortunately now when i add then try and remove items from my recycle bin I'm getting an error back from the post to the webservice.. will try and look at the umbraco source as this is driving me nuts!
Emptying the recycle bin on a production site took it down yesterday! :.(
the version of umbraco we're running is a modded version of 4.0.4.1 (i would LOVE to upgrade it believe me! but we need to wait for some stuff in core!)
Manually Emptying Recycle Bin
Hi All,
having some serious time out issues emptying from recycle bin (i.e. it is taking a production site down trying to empty over 600 nodes)
is there a manual way of nuking the recycle bin via sql?
Cheers,
Tom
This should help if you're using Umbraco 4.7: http://www.blogfodder.co.uk/2011/5/26/mass-delete-over-1k-nodes-from-recycle-bin-in-47
Here's another topic, with similar solution on page 2:
http://our.umbraco.org/forum/using/ui-questions/2787-Empty-recyle-bin-does-not-complete?p=2
delete from cmsPreviewXml where nodeId in (select id from umbracoNode where trashed = '1')
delete from cmsContentVersion where contentId in (select id from umbracoNode where trashed = '1')
delete from cmsDocument where nodeId in (select id from umbracoNode where trashed = '1')
delete from cmsContentXML where nodeId in (select id from umbracoNode where trashed = '1')
delete from cmsContent where nodeId in (select id from umbracoNode where trashed = '1')
delete from cmsPropertyData where contentNodeId in (select id from umbracoNode where trashed = '1')
delete from umbracoNode where trashed = '1'
Is my script of choice...
Thanks all!
I cleaned it up using the -20 checks but unfortunately now when i add then try and remove items from my recycle bin I'm getting an error back from the post to the webservice.. will try and look at the umbraco source as this is driving me nuts!
Emptying the recycle bin on a production site took it down yesterday! :.(
Now when i try and delete an element from the recycle bin when debugging:
public static void Delete(string NodeType, int NodeId, string Text)
{
// Load task settings
XmlDocument createDef = GetXmlDoc();
// Create an instance of the type by loading it from the assembly
XmlNode def = createDef.SelectSingleNode("//nodeType [@alias = '" + NodeType + "']");
string taskAssembly = def.SelectSingleNode("./tasks/delete").Attributes.GetNamedItem("assembly").Value;
string taskType = def.SelectSingleNode("./tasks/delete").Attributes.GetNamedItem("type").Value;
Assembly assembly = Assembly.LoadFrom(System.Web.HttpContext.Current.Server.MapPath(GlobalSettings.Path + "/../bin/" + taskAssembly + ".dll"));
Type type = assembly.GetType(taskAssembly + "." + taskType);
interfaces.ITask typeInstance = Activator.CreateInstance(type) as interfaces.ITask;
if (typeInstance != null)
{
typeInstance.ParentID = NodeId;
typeInstance.Alias = Text;
typeInstance.Delete();
}
}
the XmlNode def is null for the node type "contentRecycleBin" when there is clearly some content still in the bin im trying to delete!
Any help would be most appreciated.
Thanks,
Tom
For some reason my UI.xml file does not contain:
<nodeType alias="contentRecycleBin">
<header>Page</header>
<usercontrol>/create/content.ascx</usercontrol>
<tasks>
<delete assembly="umbraco" type="contentTasks" />
</tasks>
</nodeType>
would there be ANY reason why that would have been nuked? very confusing?!
the version of umbraco we're running is a modded version of 4.0.4.1 (i would LOVE to upgrade it believe me! but we need to wait for some stuff in core!)
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.