Copied to clipboard

Flag this post as spam?

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


  • Damiano 9 posts 30 karma points
    Mar 17, 2011 @ 11:57
    Damiano
    0

    Media section broke - No node exists with id '-21'

    Hi,

    yesterday a client sent me an email saying something like this:

    "I was deleting some images from the various folders within the Media section, when, suddenly they all went, folders and content."

    Now on the Media section there's nothing, no folders, no files, no images and no recycle bin.
    But if you try to sort the Media section you can see all the items and you can sort them with no errors. 

    If you try to add an image on a document content, when you click on "Insert / Edit image" you have the following error: "No node exists with id '-21'"

    I've just discovered (on another umbraco DB) the node with id -21 is the recycle bin of Media section.

    Is it possible the user has cancelled the recycle bin from Media?

    Can I re-add on the DB a row on the umbracoNodes table with that reference?

    Many thanks for any kind of help

  • Damiano 9 posts 30 karma points
    Mar 17, 2011 @ 17:40
    Damiano
    1

    For the moment I solved in this way:

    SET IDENTITY_INSERT umbracoNode ON

    INSERT INTO umbracoNode

                          (id, trashed, parentID, nodeUser, [level], path, sortOrder, uniqueID, text, nodeObjectType, createDate)

    VALUES     (- 21, 0, - 1, 0, 0, N'-1,-21', 0, 'bf7c7cbc-952f-4518-97a2-69e9c7b33842', N'Recycle Bin', 'cf3d8e34-1c1c-41e9-ae56-878b57b32113', 

                          CONVERT(DATETIME, '2011-03-08 16:48:48', 102))

    SET IDENTITY_INSERT umbracoNode OFF

     

    Anybody with a better solution?

    Anybody with any ideas about how is possible the user cancelled the recycle bin in Media section?

    thx

  • Anders Holmér 20 posts 41 karma points
    Oct 17, 2011 @ 13:15
    Anders Holmér
    0

    Thanks, this was right solutions for me

     

  • Mikkel Johansen 116 posts 292 karma points
    Oct 18, 2011 @ 13:04
    Mikkel Johansen
    0

    I have just had the exact same situation with a client (using Umbraco 4.7.0).

    It is nice to have the SQL to fix the problem. But does anybody know why or how the media recyclebin gets deleted?

    Regards
    Mikkel

  • Smeets Vincent 3 posts 23 karma points
    Jul 11, 2012 @ 11:22
    Smeets Vincent
    0

    You saved my life with this sql query, thanks alot, it solved my problem.

Please Sign in or register to post replies

Write your reply to:

Draft