Nodes don't load after trying to delete a property
So this is my problem.
I tried to delete a property in a master document type (named textpage) that I didn't need and I got an sql error.
Server Error in '/' Application.
The DELETE statement conflicted with the REFERENCE constraint "FK_cmsPropertyData_cmsPropertyType". The conflict occurred in database "umbraco45", table "dbo.cmsPropertyData", column 'propertytypeid'. The statement has been terminated.
Well, after that I cant load the nodes in the content section, this is the error:
Object reference not set to an instance of an object.
Stacktrace:
[NullReferenceException: Object reference not set to an instance of an object.]
umbraco.controls.ContentControl.addControlNew(Property p, TabPage tp, String Caption) +257
umbraco.controls.ContentControl.CreateChildControls() +939
System.Web.UI.Control.EnsureChildControls() +102
umbraco.controls.ContentControl.OnInit(EventArgs e) +92
System.Web.UI.Control.InitRecursive(Control namingContainer) +140
System.Web.UI.Control.AddedControl(Control control, Int32 index) +197
System.Web.UI.ControlCollection.Add(Control child) +79
umbraco.cms.presentation.editContent.OnInit(EventArgs e) +1460
System.Web.UI.Control.InitRecursive(Control namingContainer) +140
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +480
I am using umbraco 4.5
Is this a common error?
The thing is that the property is still there and I can't load the nodes which use "textpage" (I can load all the nodes which have document types using "textpage" as a master though)
had a couple of similar problems as well, usually when I was so dumb to delete a datatype that was still in use somewhere.
My guess what happened in your case: when deleting the property on the master document type Umbraco didn't clean out the property data in the child documents. The data is stored in the cmsPropertyData table, each entry contains the value and the referenced property type id. Data is only entered if you have actually put data in the property field on a node, so if there is no data in a node there will be no entry in the cmsPropertyData table. As you have deleted the property on the master doc type I assume that you also don't need the content in the child nodes? The only way to solve this (that I know of) is by diving head first into the database (adding this property again will not help as it will get another id). First you would have to find out the id of the deleted property in the cmsPropertyType table. Thankfully Umbraco doesn't delete a thing so it should still be there. Get the id of the document type, the property type id will be referenced to it. Or try to remember one of the values that you put in the field on one of the child nodes and search the cmsPropertyData table for it. Once you got the id of the property of the master doc type you can delete the data in the cmsUmbracoData table that references this property id. That should hopefully get rid of the 'Object reference not set to an instance' error.
Since I posted this issue, I found a temporary solution that worked for me. I renamed the field and changed the datatype in something that I could use in the future. I didn't delete it and used it in the end.
umbraco community is the best :D
EDIT:
oh, and the problem that I couldn't load the nodes that used the textpage doctype solved when I deleted these nodes. (Thank god that the site is still in development and it was about 4-5 nodes....)
Nodes don't load after trying to delete a property
So this is my problem.
I tried to delete a property in a master document type (named textpage) that I didn't need and I got an sql error.
Server Error in '/' Application.
The DELETE statement conflicted with the REFERENCE constraint "FK_cmsPropertyData_cmsPropertyType". The conflict occurred in database "umbraco45", table "dbo.cmsPropertyData", column 'propertytypeid'.
The statement has been terminated.
Well, after that I cant load the nodes in the content section, this is the error:
Object reference not set to an instance of an object.
I am using umbraco 4.5
Is this a common error?
The thing is that the property is still there and I can't load the nodes which use "textpage" (I can load all the nodes which have document types using "textpage" as a master though)
Thanks in advance for your help
Hi Bill,
had a couple of similar problems as well, usually when I was so dumb to delete a datatype that was still in use somewhere.
My guess what happened in your case: when deleting the property on the master document type Umbraco didn't clean out the property data in the child documents. The data is stored in the cmsPropertyData table, each entry contains the value and the referenced property type id. Data is only entered if you have actually put data in the property field on a node, so if there is no data in a node there will be no entry in the cmsPropertyData table. As you have deleted the property on the master doc type I assume that you also don't need the content in the child nodes? The only way to solve this (that I know of) is by diving head first into the database (adding this property again will not help as it will get another id). First you would have to find out the id of the deleted property in the cmsPropertyType table. Thankfully Umbraco doesn't delete a thing so it should still be there. Get the id of the document type, the property type id will be referenced to it. Or try to remember one of the values that you put in the field on one of the child nodes and search the cmsPropertyData table for it. Once you got the id of the property of the master doc type you can delete the data in the cmsUmbracoData table that references this property id. That should hopefully get rid of the 'Object reference not set to an instance' error.
Please remember to make a backup of the DB first!
All the best,
Sascha
Yeah, nice feature.
So when does it get solved? I dont like going after all my sub document types if I want to delete a property of a document type. C'mon, thats crap.
And while this is a very import part of the CMS.
Edit: Fixed in RC 4.5.1 woehoe! sweet!
@Bill, now you just have to upgrade to v4.5.1, good luck!
Oh that's great!
Since I posted this issue, I found a temporary solution that worked for me. I renamed the field and changed the datatype in something that I could use in the future. I didn't delete it and used it in the end.
umbraco community is the best :D
EDIT:
oh, and the problem that I couldn't load the nodes that used the textpage doctype solved when I deleted these nodes. (Thank god that the site is still in development and it was about 4-5 nodes....)
is working on a reply...