Copied to clipboard

Flag this post as spam?

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


  • MBE 244 posts 845 karma points
    Oct 07, 2019 @ 16:35
    MBE
    0

    Unable to clear recycle bin

    Hi guys,

    I have a whole lot of nodes in my recycle bin and apparently Umbraco isn't too happy about clearing the entire recycle bin since it just stands still.

    Is there a SQL query to do so?

    // Mike

  • Amir Khan 1199 posts 2567 karma points
    Oct 07, 2019 @ 18:56
  • MBE 244 posts 845 karma points
    Oct 17, 2019 @ 13:14
    MBE
    0

    Hey Amir,

    I tried following the tips in the thread and I was able to execute some of the SQL, however a lot of them fails with errors like:

    DELETE FROM cmsContent WHERE nodeId IN (SELECT id FROM umbracoNode WHERE (path LIKE '%-21%' AND id!=-21) OR (path LIKE '%-20%' AND id!=-20));
    
    Error: The primary key value cannot be deleted because references to this key still exist. [ Foreign key constraint name = FK_cmsMedia_cmsContent_nodeId ]
    
    DELETE FROM umbracoUser2NodePermission WHERE nodeId IN (SELECT id FROM umbracoNode WHERE (path LIKE '%-21%' AND id!=-21) OR (path LIKE '%-20%' AND id!=-20));
    
    Error: The specified table does not exist. [ umbracoUser2NodePermission ]
    

    I attempted to manually clear the content and media recycle bin but it doesn't work. If I manually clear 1 item in the bin I get a 404:

        Request error: The URL returned a 404 (not found):
    /umbraco/backoffice/UmbracoApi/Media/DeleteById
    

    The working SQL affected a lot of items so something has happened, I just cannot empty the bin.

    // Mike

  • 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" button below.

    Continue discussion

Please Sign in or register to post replies