Copied to clipboard

Flag this post as spam?

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

  • Damian Green 452 posts 1433 karma points
    Feb 18, 2013 @ 13:32
    Damian Green

    No node exists with id '0' when trying to add a document type

    Had this issue all morning and cant nail what is causing it.

    I have a few document types defined and ive stripped them right back to all that work fine but when I add a new type with just a string property for example i get the error below.

    To make it even odder if i remove all the properties and just create the type it adds it.  Then if i add a property to the class, rebuild and run it adds ok.  If I then delete the entire content type object from umbraco and restart the app pool so it recreates, it then falls over again with the same error! ??? Odd.

    Any ideas cos its driving me nuts and im going knowhere, About to ditch uSitebuilder shortly.


    No node exists with id '0'

    [ArgumentException: No node exists with id '0']
       umbraco.cms.businesslogic.CMSNode.setupNode() +239
       umbraco.cms.businesslogic.ContentType.setupNode() +33
       umbraco.cms.businesslogic.CMSNode..ctor(Int32 Id) +36
       umbraco.cms.businesslogic.ContentType.GetByAlias(String Alias) +137
       Vega.USiteBuilder.ManagerBase.SynchronizeContentTypeProperties(Type typeContentType, ContentType contentType, Boolean& hadDefaultValues) +872
       Vega.USiteBuilder.DocumentTypeManager.SynchronizeDocumentType(Type typeDocType, Type baseTypeDocType) +509
       Vega.USiteBuilder.DocumentTypeManager.SynchronizeDocumentTypes(Type baseTypeDocType) +116
       Vega.USiteBuilder.DocumentTypeManager.SynchronizeDocumentTypes(Type baseTypeDocType) +126
       Vega.USiteBuilder.DocumentTypeManager.Synchronize() +53
       Vega.USiteBuilder.UmbracoManager.Synchronize() +87
       Vega.USiteBuilder.UmbracoManager.SynchronizeIfNotSynchronized() +94
       Vega.USiteBuilder.USiteBuilderHttpModule.BeginRequest(Object sender, EventArgs e) +5
       System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +197
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +70


  • Vladan Ostojic 94 posts 210 karma points
    Feb 18, 2013 @ 13:56
    Vladan Ostojic

    Damian, this is issue is not related with the uSiteBuilder. If you try to create the document manually (through browser) you'd get the same error. The problem is that you probably changed the inheritance between document types which Umbraco does not handle very well. Actually you cannot do it through browser at all (change inheritance) but it can be done through uSiteBuilder (but I wouldn't recommend to do it).

  • Damian Green 452 posts 1433 karma points
    Feb 18, 2013 @ 14:14
    Damian Green

    Thanks for the info Vladan.

    I do seem to remember changing the inheritance on one of the document types.

    Rather a scary issue if this was done on a mature site. Lucky ive hit this issue right at the start of a fresh site. Phew.

    I have been trying to find what the issue was by changing the Name= property on the document type and it worked. Soon as i changed the name it broke again. Completely random!

    Whats the solution? Do i have to delete doc types from umbraco and give my types new names? Or is the deployment junked and im better off starting a fresh?  


  • Damian Green 452 posts 1433 karma points
    Feb 18, 2013 @ 14:17
    Damian Green

    I've gotten it working then removed the offending doc types and then recreated manually in umbraco without an issue.


  • Damian Green 452 posts 1433 karma points
    Feb 18, 2013 @ 14:30
    Damian Green

    I recreated the doc type in umbraco, rebuilt my doctypes dll, copied in etc... and restarted the app and all ok.

    Removed the doc types from umbraco, restarted the app and the doc type was then recreated fine (that wouldnt create before).

    Removed the doc type again, restarted and it all came back fine.

    So it looks to me like if you need to change anything about a type - its alias, name, inheritance scheme etc.. Make sure you remove it from umbraco manually before putting in the new dll.  Then, when it rebuilds it doesnt get confused with the old type.

    Will see how i go with this and report back. Want to make sure i dont get this happening in future.



  • Vladan Ostojic 94 posts 210 karma points
    Feb 18, 2013 @ 15:00
    Vladan Ostojic

    Of course that's the easiest way out but very often that's not possible as by deleting document types you also delete the content.

  • Damian Green 452 posts 1433 karma points
    Feb 18, 2013 @ 16:16
    Damian Green

    Luckily i've no content at this point! :)


  • Vladan Ostojic 94 posts 210 karma points
    Feb 18, 2013 @ 17:14
    Vladan Ostojic

    I'll also add the point for those who did this on production. If you change the inheritance between document types and get this error just change the inheritance back as it was and the error disappears. 

  • Damian Green 452 posts 1433 karma points
    Feb 18, 2013 @ 17:17
    Damian Green

    I've now got some crazy things going on where the AllowedChildNodeTypes are not getting set on the structure so im starting over to see if i still have the error before looking at it any more. Not got a lot done today :(



  • Pavel Gurecki 55 posts 158 karma points
    Jun 12, 2013 @ 12:52
    Pavel Gurecki

    I've got the same error on Umbraco 6.1.1 and latest uSitebuilder build.

    It started to appear after changing inheritance structure in one of doctypes.

    I've deleted all content nodes and doctypes, but when attempting to sync - error comes up again.

    I've even checked all db tables for any references to deleted doctypes/content - nothing there.

    After debugging uSitebuilder source, it seems that newly created doctype is not saved properly before getting it by alias - method throws an exception as there is no doctype for that alias ("No node exists with id '0' "). Tried passing unexisting doctype alias to that function and got same exception. Code causing this:

      // refresh document type to load tabs again
      contentType = ContentType.GetByAlias(contentType.Alias);

    Can't think of any relation between changing doctype inheritance and this exception. What's even more weird, is that this exception is being thrown on doctype which wasn't changed.

    I think this is uSitebuilder issue and should be fixed.

    Possible reference to related problem:

  • Damian Green 452 posts 1433 karma points
    Jun 12, 2013 @ 13:00
    Damian Green

    As much as i loved uSitebuilder ive completely stopped using it because its just not there yet for v6 and thats the version i want to be using.

    I know that a code first option is being looked at going forward but that could be a while yet - so im back to using the backend for creating my doc types for now.


  • Anders Brohäll 295 posts 561 karma points c-trib
    Jul 11, 2013 @ 14:17
    Anders Brohäll

    Got the same problem whilst adding Alias = "Lorem Ipsum" to a document type.
    Reverted back to not using Alias and it works again.

    Im also working towards a empty DB at them moment, but i got loads of copies of the document type. Deleting them and running the sync again wasn't a problem...
    For me.

    ... using Umbraco 6.1.2 and uSiteBuilder 1.2.5

  • Markus Johansson 1918 posts 5785 karma points MVP c-trib
    Dec 15, 2017 @ 17:01
    Markus Johansson


    When I just tried this on an Umbraco 6-site I got a lot of these:

    [ArgumentException: No node exists with id '0']

    I tried lots of stuff but for me it boiled down to having to set the "Alias" (in the attribute) to exactly the same as the name of my class.

    It seems like it's sometimes using the "Alias"-property to get the content type name and sometimes the class name.

    After making sure that they had exactly the same value/name - it just worked =D

    Edit: One more thing, I'm not sure but it also looked like having the backoffice opened (the "logout check" is running) at the same time as reloading the front end could fire two instances of the "sync service" - which also created some interesting errors.

Please Sign in or register to post replies

Write your reply to: