[DocumentType(Name = "Forside", Description = "Forside for hele sitet", AllowedChildNodeTypes = new Type[] { typeof(TextPageDocType), typeof(ContactDocType) })] public class FrontpageDocType : MasterDocType
The error occurs when I try to add a new Type to AllowedChildNodeType: Like
[DocumentType(Name = "Forside", Description = "Forside for hele sitet",
AllowedChildNodeTypes = new Type[] { typeof(TextPageDocType),
typeof(ContactDocType), typeof(FolderDocType) })]
All my docTypes inherits from MasterDocType which from SiteBuilder.DocumentTypes
Umbraco 4.7, SQLCe
I get this error:
[NullReferenceException: Object reference not set to an instance of an object.]
Vega.USiteBuilder.DocumentTypeManager.SynchronizeAllowedChildContentType(Type typeDocType) +248
Vega.USiteBuilder.DocumentTypeManager.SynchronizeAllowedChildContentTypes(Type baseTypeDocType) +125
Vega.USiteBuilder.DocumentTypeManager.SynchronizeAllowedChildContentTypes(Type baseTypeDocType) +137
Vega.USiteBuilder.DocumentTypeManager.Synchronize() +131
Vega.USiteBuilder.UmbracoManager.SynchronizeDocumentTypes() +63
Vega.USiteBuilder.UmbracoManager.Synchronize() +31
Vega.USiteBuilder.UmbracoManager.SynchronizeIfNotSynchronized() +84
Vega.USiteBuilder.USiteBuilderHttpModule.BeginRequest(Object sender, EventArgs e) +31
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +148
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75
Hi Kasper, which version of uSiteBuider are you using? Are all your document types created in Umbraco? As you cannot access your umbraco backend, you may want to remove dll with your document types and then check if documents types are created. There is probably something wrong with your document type that you are trying to add to AllowedChildNodeTypes...
Critical error when chaning AllowedChildNodeTypes
Hi everyone
I need some help / workaround for this error.
My setup :
[DocumentType(Name = "Forside", Description = "Forside for hele sitet", AllowedChildNodeTypes = new Type[] { typeof(TextPageDocType), typeof(ContactDocType) })]
public class FrontpageDocType : MasterDocType
The error occurs when I try to add a new Type to AllowedChildNodeType: Like
[DocumentType(Name = "Forside", Description = "Forside for hele sitet", AllowedChildNodeTypes = new Type[] { typeof(TextPageDocType), typeof(ContactDocType), typeof(FolderDocType) })]
All my docTypes inherits from MasterDocType which from SiteBuilder.DocumentTypes
Umbraco 4.7, SQLCe
I get this error:
[NullReferenceException: Object reference not set to an instance of an object.] Vega.USiteBuilder.DocumentTypeManager.SynchronizeAllowedChildContentType(Type typeDocType) +248 Vega.USiteBuilder.DocumentTypeManager.SynchronizeAllowedChildContentTypes(Type baseTypeDocType) +125 Vega.USiteBuilder.DocumentTypeManager.SynchronizeAllowedChildContentTypes(Type baseTypeDocType) +137 Vega.USiteBuilder.DocumentTypeManager.Synchronize() +131 Vega.USiteBuilder.UmbracoManager.SynchronizeDocumentTypes() +63 Vega.USiteBuilder.UmbracoManager.Synchronize() +31 Vega.USiteBuilder.UmbracoManager.SynchronizeIfNotSynchronized() +84 Vega.USiteBuilder.USiteBuilderHttpModule.BeginRequest(Object sender, EventArgs e) +31 System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +148 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75
Hi Kasper, which version of uSiteBuider are you using? Are all your document types created in Umbraco? As you cannot access your umbraco backend, you may want to remove dll with your document types and then check if documents types are created. There is probably something wrong with your document type that you are trying to add to AllowedChildNodeTypes...
Hi Vladan
Thanks fore the quick reply. I am using SiteBiulder v. 1.2.
After removing all SiteBuilder references, i finally got into the Umbraco backend, an saw that all the DocTypes has been created.
My FolderDocType looks very simple, and i cannot image that there is somethim wrong with it - but i might be missing the big picture here :)
[DocumentType(Name = "Mappe")]
public class FolderDocType
{
}
Are some of the other attributes necessary for this to work?
/Kasper
FolderDocType should subclass DocumentTypeBase. All your document types at some point in the hierarchy should subclass from DocumentTypeBase.
[DocumentType(Name = "Mappe")]
public class FolderDocType : DocumentTypeBase
{
}
Can you verify if that's the case?
Fixed.. It was obvious when I looked at the posted code snippet.. I forgot I inherit from my MasterDocType. But thanks anyway for the pointers.
[DocumentType(Name = "Mappe")]
public class FolderDocType : MasterDocType
{
...
}
Best regard
Kasper
Ok, np :)
is working on a reply...