Copied to clipboard

Flag this post as spam?

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


  • Phil Dye 149 posts 325 karma points
    Dec 05, 2011 @ 12:36
    Phil Dye
    0

    CheckPermissions error when copying root node

    I'm getting an error when copying a root node (to create a multilingual site for translation). I right click on the root site node, click Copy, and the modal window contains;

     

    Server Error in '/' Application.

    Object reference not set to an instance of an object.

    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.NullReferenceException: Object reference not set to an instance of an object.

    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: 

    [NullReferenceException: Object reference not set to an instance of an object.]

       umbraco.dialogs.moveOrCopy.CheckPermissions(CMSNode node, IAction currentAction, Char actionLetter) +193

       umbraco.dialogs.moveOrCopy.CheckPermissions(CMSNode node, IAction currentAction, Char actionLetter) +327

       umbraco.dialogs.moveOrCopy.CheckPermissions(CMSNode node, IAction currentAction, Char actionLetter) +327

       umbraco.dialogs.moveOrCopy.Page_Load(Object sender, EventArgs e) +1634

       System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +24

       umbraco.BasePages.BasePage.OnLoad(EventArgs e) +18

       System.Web.UI.Control.LoadRecursive() +70

       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3063

    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.237

     

    This is using Umbraco 4.7.1, on Windows Server 2008R2, IIS7.5.

     

    Phil

     

  • Phil Dye 149 posts 325 karma points
    Dec 05, 2011 @ 13:38
    Phil Dye
    0

    I've now also found a repeat of "4.6.1 YSOD in Translation section with SQL CE" (http://umbraco.codeplex.com/workitem/29973), albeit now in 4.7.1.

    However, this is on a site in which initial development was started in SQL CE, and the database later moved to SQL Server using the WebMatrix migration tool. I suspect there's a schema problem therefore.

    Phil

  • Phil Dye 149 posts 325 karma points
    Dec 05, 2011 @ 14:03
    Phil Dye
    0

    Yep, as I thought; the migration in WebMatrix to full-SQL Server has munged the schema, chaning cmsTask.taskTypeId from tinyint to int;

     

     

  • Phil Dye 149 posts 325 karma points
    Dec 05, 2011 @ 16:41
    Phil Dye
    0

    Right, I've tracked down the CheckPermissions error to an orphaned content node in the database; removing this manually from the umbracoNode table (and associated fk tables) has resolved the problem. I don't know how it got there, presumably something failed when it was created or deleted much earlier in the project. It wasn't rendering in the backoffice, but was clearly causing an internal problem.

    Phil

     

  • Ally Watson 16 posts 37 karma points
    Jun 20, 2012 @ 16:09
    Ally Watson
    0

    Hey Phil, how were you able to identify the orphaned node in the UmbracoNode table? 

     

    Thanks,

    Ally

  • Brendan Rice 538 posts 1099 karma points
    Oct 31, 2012 @ 02:32
    Brendan Rice
    0

    Anyone know how to get the orphaned nodes in the UmbracoNode table please?

  • Sittichai 1 post 23 karma points
    Nov 12, 2012 @ 12:16
    Sittichai
    2

    I don't know this is the best way to find the orphaned or not but I do this then I can move or copy root node.

     

    1. I find the orphaned nodes by this script

    select * from umbracoNode where id not in (select nodeid from cmsContentXml)

     

    2. select only nodes the have the level of "path" more than 2 level. e.g. -1,-92,-1346,-3456

    and review all site to make sure that all selected nodes are the real Document Node not data type, template, document type or else

     

    3. delete all orphaned nodes by the script below (you should change the criteria to your nodeid)

    delete from cmsPropertyData where contentNodeId in (

    1787,

    1913

    ...

    )

    delete from cmsDocument where nodeId in (

    1787,

    1913

    ...

    )

    delete from cmsContentVersion where ContentId in (

    1787,

    1913

    ...

    )

    delete from cmscontent where nodeId in (

    1787,

    1913

    ...

    )

    delete from umbracoNode where id in (

    1787,

    1913

    ...

    )

  • andy_rose 91 posts 117 karma points
    Jun 25, 2013 @ 15:21
    andy_rose
    0

    Just to add to this, I also had to remove a reference to the node id in the umbracoUser2NodePermission table before I could remove it from the umbracoNode table:

    delete from umbracoUser2NodePermission where nodeId = 1234
  • Bjørn Fridal 274 posts 784 karma points
    Feb 03, 2014 @ 10:18
    Bjørn Fridal
    0

    Thanks Sittichai that worked a treat.

    Cheers
    Bjørn Fridal 

Please Sign in or register to post replies

Write your reply to:

Draft