Deleted data type -> No node exists with id 'xxxx'
Hi,
I think one of my data types has been edited/deleted somewhere along the line, and content of that type no longer loads in admin. Rather than try to restore the data type that has been deleted, how can I delete all and any refs to that property in any created pages? That should fix the problem, non? I'm happy to dive into the database.
yeah, came across that before, it's unfortunately a bit ugly but manually sorting out the database did the trick for me back then as well, no trouble since then with the site. Here's what I'd do:
***** All SQL statements are given as SELECT statements. To clean the data out you'd have to replace that with DELETE of course, probably in certain sequence to observe foreign keys! *****
1. Double check that the type is really not there anymore:
SELECT * FROM CmsDataType WHERE NodeId = [MissingDataTypeNodeId]
2. Look up the property type ids of your data type in CmsPropertyType
You need to do this manually as your datatype has already been deleted from CmsDataType. Going by the alias is the simplest method, then you have the DataTypeId [DataTypeId] and a collection of property type ids where this has been used [CmsPropertyTypeIds].
3. Check in CmsDataTypePreValues if there are any remainders (optional, they won't hurt anybody I guess):
SELECT * FROM CmsDataTypePreValues WHERE DatatypeNodeId = [MissingDataTypeNodeId]
4. Now comes the real deal: deleting all references in CmsPropertyData:
for each id in [CmsPropertyTypeIds] SELECT * FROM CmsPropertyData WHERE Propertytypeid = [CmsPropertyTypeId]
5. Delete the reference to your non-existing DataType in the CmsPropertyType table
for each id in [CmsPropertyTypeIds] SELECT * FROM CmsPropertyType WHERE Id = [CmsPropertyTypeId]
And that should do the trick. Please give me a heads up if that worked or what else you had to do so I can put a wiki doc together for future reference.
Thanks, this is a massive help - other posts I've seen were pretty vague on how to do it. I'll get back to you with any probs I had, or anything else I had to do.
Have been digging around in the database. Wanted to make sure what I *thought was wrong, was wrong. Could this error be caused by 'path' information in the XML?
(as example)
path="-1,-20,1234,9999,4321,2222"
2222 is obviously the page in question (loads as normal, but not in admin - give "no node exists with id '9999')
4321 is parent node. Exists and working fine.
** 9999 is the ID that is mentioned in 'No node exists with ID' error. This number doesn' t match up with the ID I can see by hovering mouseover the appropriate node in admin. Is this the problem (maybe new node was created and content moved across?)... This is a large section of the website, so maybe there was some kind of error when moving the nodes across.
If this is the prob, can I just do an SQL search & replace to change all path information to the correct figures?
Hm, I don't know, first time I heard of path info maybe not being correct. Unfortunately I also don't know what actually relies on that information (I guess the frontend just goes via .parentID as it doesn't need to know the full hierarchy to display a specific page). Maybe make a db copy and try it out? My gut though tells me that this will not be the reason, yet can't hurt to give it a shot... ;)
Ran some SQL to fix all the incorrect path info... Seems fine now. All content loading in admin.
I think I will need to refer to your original reply as I think I've messed up the doctype on the live version (trying to fix, thinking datatypes/doctypes were the problem, before I posted here)... So thanks again for the help! I'll get back if I find anything useful.
Same for me, the "path" column of the umbracoNode table was the guilty party. I had to manually do a lookup for the offending item and change them manually.
Deleted data type -> No node exists with id 'xxxx'
Hi,
I think one of my data types has been edited/deleted somewhere along the line, and content of that type no longer loads in admin. Rather than try to restore the data type that has been deleted, how can I delete all and any refs to that property in any created pages? That should fix the problem, non? I'm happy to dive into the database.
delete * from *.
Thanks for any help,
P.S. don't delete datatypes
Hi Paul,
yeah, came across that before, it's unfortunately a bit ugly but manually sorting out the database did the trick for me back then as well, no trouble since then with the site. Here's what I'd do:
***** All SQL statements are given as SELECT statements. To clean the data out you'd have to replace that with DELETE of course, probably in certain sequence to observe foreign keys! *****
1. Double check that the type is really not there anymore:
SELECT *
FROM CmsDataType
WHERE NodeId = [MissingDataTypeNodeId]
2. Look up the property type ids of your data type in CmsPropertyType
You need to do this manually as your datatype has already been deleted from CmsDataType. Going by the alias is the simplest method, then you have the DataTypeId [DataTypeId] and a collection of property type ids where this has been used [CmsPropertyTypeIds].
3. Check in CmsDataTypePreValues if there are any remainders (optional, they won't hurt anybody I guess):
SELECT *
FROM CmsDataTypePreValues
WHERE DatatypeNodeId = [MissingDataTypeNodeId]
4. Now comes the real deal: deleting all references in CmsPropertyData:
for each id in [CmsPropertyTypeIds]
SELECT *
FROM CmsPropertyData
WHERE Propertytypeid = [CmsPropertyTypeId]
5. Delete the reference to your non-existing DataType in the CmsPropertyType table
for each id in [CmsPropertyTypeIds]
SELECT *
FROM CmsPropertyType
WHERE Id = [CmsPropertyTypeId]
And that should do the trick. Please give me a heads up if that worked or what else you had to do so I can put a wiki doc together for future reference.
Cheers,
Sascha
Thanks, this is a massive help - other posts I've seen were pretty vague on how to do it. I'll get back to you with any probs I had, or anything else I had to do.
Cheers!
Have been digging around in the database. Wanted to make sure what I *thought was wrong, was wrong. Could this error be caused by 'path' information in the XML?
(as example)
path="-1,-20,1234,9999,4321,2222"
2222 is obviously the page in question (loads as normal, but not in admin - give "no node exists with id '9999')
4321 is parent node. Exists and working fine.
** 9999 is the ID that is mentioned in 'No node exists with ID' error. This number doesn' t match up with the ID I can see by hovering mouseover the appropriate node in admin. Is this the problem (maybe new node was created and content moved across?)... This is a large section of the website, so maybe there was some kind of error when moving the nodes across.
If this is the prob, can I just do an SQL search & replace to change all path information to the correct figures?
Thanks for your help,
Hm, I don't know, first time I heard of path info maybe not being correct. Unfortunately I also don't know what actually relies on that information (I guess the frontend just goes via .parentID as it doesn't need to know the full hierarchy to display a specific page). Maybe make a db copy and try it out? My gut though tells me that this will not be the reason, yet can't hurt to give it a shot... ;)
Ran some SQL to fix all the incorrect path info... Seems fine now. All content loading in admin.
I think I will need to refer to your original reply as I think I've messed up the doctype on the live version (trying to fix, thinking datatypes/doctypes were the problem, before I posted here)... So thanks again for the help! I'll get back if I find anything useful.
Glad you got it fixed! :) And interesting that it was actually the path entry...
Same for me, the "path" column of the umbracoNode table was the guilty party. I had to manually do a lookup for the offending item and change them manually.
Bit of a pain, but all is well now!
is working on a reply...