Copied to clipboard

Flag this post as spam?

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


  • Bambe 45 posts 66 karma points
    May 18, 2011 @ 08:12
    Bambe
    0

    Error: No node exists with id '-21'

    Hi,all

    I press insertLink and insertImage buttons when I edit content in RTE in whatever conents uses RTE

    the error message is following here:

    No node exists with id '-21' 
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.ArgumentException: System.ArgumentException: No node exists with id '-21'

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:


    [ArgumentException: No node exists with id '-21']
       umbraco.cms.businesslogic.CMSNode.setupNode() +244
       umbraco.cms.businesslogic.CMSNode..ctor(Int32 Id) +36
       umbraco.cms.presentation.Trees.MediaRecycleBin.CreateRootNode(XmlTreeNode& rootNode) +142
       umbraco.cms.presentation.Trees.BaseTree.CreateRootNode() +68
       umbraco.cms.presentation.Trees.BaseTree.Initialize() +154
       umbraco.cms.presentation.Trees.BaseTree.SetTreeParameters(ITreeService treeParams) +123
       umbraco.controls.Tree.TreeControl.Initialize() +431
       umbraco.controls.Tree.TreeControl.OnPreRender(EventArgs e) +47
       System.Web.UI.Control.PreRenderRecursiveInternal() +103
       System.Web.UI.Control.PreRenderRecursiveInternal() +175
       System.Web.UI.Control.PreRenderRecursiveInternal() +175
       System.Web.UI.Control.PreRenderRecursiveInternal() +175
       System.Web.UI.Control.PreRenderRecursiveInternal() +175
       System.Web.UI.Control.PreRenderRecursiveInternal() +175
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2496

     


    --------------------------------------------------------------------------------
    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1

    and in umbraLog message is:

    At /nweb/umbraco/plugins/tinymce3/insertImage.aspx (Referred by: http://domain/nweb/umbraco/editContent.aspx?id=6746): System.ArgumentException: No node exists with id '-21'     At umbraco.cms.businesslogic.CMSNode.setupNode()     At umbraco.cms.businesslogic.CMSNode..ctor(Int32 Id)     At umbraco.cms.presentation.Trees.MediaRecycleBin.CreateRootNode(XmlTreeNode& rootNode)     At umbraco.cms.presentation.Trees.BaseTree.CreateRootNode()     At umbraco.cms.presentation.Trees.BaseTree.Initialize()     At umbraco.cms.presentation.Trees.BaseTree.SetTreeParameters(ITreeService treeParams)     At umbraco.controls.Tree.TreeControl.Initialize()     At umbraco.controls.Tree.TreeControl.OnPreRender(EventArgs e)     At System.Web.UI.Control.PreRenderRecursiveInternal()     At System.Web.UI.Control.PreRenderRecursiveInternal()     At System.Web.UI.Control.PreRenderRecursiveInternal()     At System.Web.UI.Control.PreRenderRecursiveInternal()     At System.Web.UI.Control.PreRenderRecursiveInternal()     At System.Web.UI.Control.PreRenderRecursiveInternal()     At System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
    At /nweb/umbraco/plugins/tinymce3/insertLink.aspx (Referred by: http://domain/nweb/umbraco/editContent.aspx?id=6746): System.ArgumentException: No node exists with id '-21'     At umbraco.cms.businesslogic.CMSNode.setupNode()     At umbraco.cms.businesslogic.CMSNode..ctor(Int32 Id)     At umbraco.cms.presentation.Trees.MediaRecycleBin.CreateRootNode(XmlTreeNode& rootNode)     At umbraco.cms.presentation.Trees.BaseTree.CreateRootNode()     At umbraco.cms.presentation.Trees.BaseTree.Initialize()     At umbraco.cms.presentation.Trees.BaseTree.SetTreeParameters(ITreeService treeParams)     At umbraco.controls.Tree.TreeControl.Initialize()     At umbraco.controls.Tree.TreeControl.OnPreRender(EventArgs e)     At System.Web.UI.Control.PreRenderRecursiveInternal()     At System.Web.UI.Control.PreRenderRecursiveInternal()     At System.Web.UI.Control.PreRenderRecursiveInternal()     At System.Web.UI.Control.PreRenderRecursiveInternal()     At System.Web.UI.Control.PreRenderRecursiveInternal()     At System.Web.UI.Control.PreRenderRecursiveInternal()     At System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

    what's the problem :(

     

    Regards,

    Bambe. :)

  • Bambe 45 posts 66 karma points
    May 20, 2011 @ 03:53
    Bambe
    0

    okay I found the way to fix...

    http://our.umbraco.org/forum/using/ui-questions/20431-the-Media-Tree-gone-away

    the node -21 is Media section's Recycle Bin

    it has been deleted from unknown way

    so I recovered them and fixed :)

  • Rich Green 2246 posts 4008 karma points
    Oct 25, 2011 @ 11:33
    Rich Green
    2

    For info, running this fixed the problem for me

    SET IDENTITY_INSERT [umbracoNode] ON

    INSERT [umbracoNode]([id]
          ,[trashed]
          ,[parentID]
          ,[nodeUser]
          ,[level]
          ,[path]
          ,[sortOrder]
          ,[uniqueID]
          ,[text]
          ,[nodeObjectType]
          ,[createDate])
    VALUES (-21, 0,-1,0,0,'-1,21',0,'BF7C7CBC-952F-4518-97A2-69E9C7B33842','Recycle Bin','CF3D8E34-1C1C-41E9-AE56-878B57B32113',getDate())
     
    SET IDENTITY_INSERT [umbracoNode] OFF
     

    Rich

  • James Green 3 posts 23 karma points
    Jun 18, 2014 @ 15:39
    James Green
    0

    Thanks Rich, your insert statement worked for me too.

  • Rich Green 2246 posts 4008 karma points
    Jun 18, 2014 @ 15:40
    Rich Green
    0

    Wow, old post, good to know it still helps!

    :)

  • Mike 62 posts 274 karma points
    Mar 13, 2015 @ 22:23
    Mike
    0

    Hi Rich, just stumbled upon this issue in a 4.11.8 site, however, the site is running MySQL rather than MSSQL.

    Would there be any alterations to the SQL command for MySQL as I'm getting an "Unknown system variable 'IDENTITY_INSERT'" error?

    Thanks,
    Mike 

  • Mike 62 posts 274 karma points
    Mar 14, 2015 @ 00:26
    Mike
    0

    Ok, in case this helps anyone else running into the same issue on MySQL, In MySql there is no lock against inserting into an auto-increment primary key so the SET IDENTITY_INSERT can be dropped from the statement. Here's a statement that worked for me using MySQL:

    INSERT `umbracoNode`(`id`
         ,`trashed`
         ,`parentID`
         ,`nodeUser`
         ,`level`
         ,`path`
         ,`sortOrder`
         ,`uniqueID`
         ,`text`
         ,`nodeObjectType`
         ,`createDate`)
    VALUES (-21, 0,-1,0,0,'-1,21',0,'BF7C7CBC-952F-4518-97A2-69E9C7B33842','Recycle Bin','CF3D8E34-1C1C-41E9-AE56-878B57B32113',Now())
Please Sign in or register to post replies

Write your reply to:

Draft