In our backend we are missing 2 nodes. The strange thing is that if I sort the nodes I can see the 2 nodes. See these screenshots:
As you can see the 2 nodes we are missing have the same name. Could this cause a problem? We first deleted the first node and than recreated it with the same name and now we don't see them both. What's the best way to solve this?
However I had the same issue once with an old 4.0 install still don't know what happened but I used the Content Maintenance Dashboard package to delete the node (It showed up in the resultset so I could delete it) and added it again and then it worked fine, maybe a Network/DB hickup caused the issue.
I would advise against trying to manually delete from the database as if it's not done correctly it leads to all sorts of other problems - I know from experience and have found out the hard way.
Hmm I can find the nodes with the Content Maintenance dashboard (great package), but when I try to delete the node I get this error:
No Document exists with Version '8f6b5b52-3ec7-4153-be7f-9f417ba04dfd'
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.ArgumentException: No Document exists with Version '8f6b5b52-3ec7-4153-be7f-9f417ba04dfd'
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:
[ArgumentException: No Document exists with Version '8f6b5b52-3ec7-4153-be7f-9f417ba04dfd']
umbraco.cms.businesslogic.web.Document.setupNode() +487
umbraco.cms.businesslogic.CMSNode..ctor(Int32 Id) +36
ContentMaintenanceDashboard.Helpers.UmbracoHelper.DeleteItem(Int32 id) +37
ContentMaintenanceDashboard.ContentMaintenanceDashboard.DeleteButton_Command(Object sender, CommandEventArgs e) +21
System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +115
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +167
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5563
Maybe these 2 nodes only exists in the umbracoNode table...
One small tip I just delete the wrong node by accident in the Content Maintenance dashboard by pressing the wrong button. Maybe add a confirmation message :).
Just spent the last hour working on this. Apparently was an entry in cmsContentVersion that didn't have a match anywhere else. Deleted it and everything is fine.
I did try the Content Management package, and that's how I found the orphaned version. The package found the node, but couldn't delete or unpublish it due to missing content version.
Another strange this, there were 2 versions for the problematic document with an updateDate different by only 100 ms. Strange.
Only removing the cmsContentVersion data didn't work for me. I used this query to delete all the node data:
delete from cmsPreviewXml where nodeId = 1620
delete from cmsContentVersion where ContentId = 1620
delete from cmsDocument where nodeId = 1620
delete from cmsContent where nodeId = 1620
delete from cmsPropertyData where contentNodeId = 1620
delete from umbracoNode where id = 1620
I did this for the duplicated nodes (id 1616 and 1620) and now they're gone. I can't find them when sorting or in the Content Maintance dashboard or in the umbraco.config after a republish. Seems this solved it for me.
This problem (node not appearing in tree or recycle bin, but present in Sort dialog) occurred today for me when simply refreshing the admin page (Running Umbraco 4.0.4.2). It was very disconcerting that the main node below "Content" disappeared, especially since all the site contents was under it. I didn't want to risk problems by deleting a cmsContentVersion record, so instead I updated the VersionDate for the last record for the node to have a date before the next to last version. This resolved the problem so that the main node appeared again in the Ubraco admin.
-- Last two records: -- id ContentId VersionId VersionDate -- 7096 1061 9AA58797-8805-42D5-B7F7-6681FBB22677 2012-10-23 10:05:23.520 -- 7097 1061 5A97DECC-73D7-47DF-A1AC-A48898907BE9 2012-10-23 10:05:39.270
UPDATE[UmbracoDB].[dbo].[cmsContentVersion] SET [VersionDate] = '2012-10-23 10:05:20.270' WHERE id = 7097 AND ContentId = 1061
I used this SQL to find the node id's to delete - just replace the parent id of the node that you cant sort childs for:
SELECT id from umbracoNode WHERE parentID = 1170 AND id NOT IN ( SELECT DISTINCT doc.nodeId FROM cmsDocument AS doc LEFT OUTER JOIN umbracoNode AS node ON doc.nodeId = node.id WHERE node.parentID = 1170)
My problem is that it does not seem to be limited to a certain node, but rather randomly throughout the node structure in various unreleated places. Any ideas on a script that can Identify and fix all the problems? Or rather at least one that can find all the problems without providing a node id?
DELETE FROM cmsTask WHERE nodeId = @Id
DELETE FROM umbracoUser2NodeNotify WHERE nodeId = @Id
DELETE FROM umbracoUser2NodePermission WHERE nodeId = @Id
DELETE FROM umbracoRelation WHERE parentId = @Id
DELETE FROM umbracoRelation WHERE childId = @Id
DELETE FROM cmsTagRelationship WHERE nodeId = @Id
DELETE FROM umbracoDomains WHERE domainRootStructureID = @Id
DELETE FROM cmsDocument WHERE nodeId = @Id
DELETE FROM cmsPropertyData WHERE contentNodeId = @Id
DELETE FROM cmsPreviewXml WHERE nodeId = @Id
DELETE FROM cmsContentVersion WHERE ContentId = @Id
DELETE FROM cmsContentXml WHERE nodeId = @Id
DELETE FROM cmsContent WHERE nodeId = @Id
DELETE FROM umbracoNode WHERE id = @Id
It also does a few other things you may want to look into (unpublishing, handling child nodes, and so on).
Missing nodes in backend
Hello,
In our backend we are missing 2 nodes. The strange thing is that if I sort the nodes I can see the 2 nodes. See these screenshots:
As you can see the 2 nodes we are missing have the same name. Could this cause a problem? We first deleted the first node and than recreated it with the same name and now we don't see them both. What's the best way to solve this?
Jeroen
Running on Umbraco 4.6.1
I assume you already check the recycle bin?
Yeah the recycle bin is empty.
Should I try to remove the nodes from the database or is there a better solution?
Jeroen
Strange,
However I had the same issue once with an old 4.0 install still don't know what happened but I used the Content Maintenance Dashboard package to delete the node (It showed up in the resultset so I could delete it) and added it again and then it worked fine, maybe a Network/DB hickup caused the issue.
Cheers,
Richard
I would advise against trying to manually delete from the database as if it's not done correctly it leads to all sorts of other problems - I know from experience and have found out the hard way.
Content Maintenance Dashboard doesn't delete them manually from the DB, The document object is still there and it deletes it via the Document object
Hmm I can find the nodes with the Content Maintenance dashboard (great package), but when I try to delete the node I get this error:
Maybe these 2 nodes only exists in the umbracoNode table...
One small tip I just delete the wrong node by accident in the Content Maintenance dashboard by pressing the wrong button. Maybe add a confirmation message :).
Jeroen
Sorry Richard, I was referring to the post before yours I should have mentioned :) Content Maintenance Dashboard is a great package!
Sorry Simon, Didn't see that one.. @Jeroen Who needs a confirm when you have a Recylce bin :) But will add it some day I guess.
Oh didn't know they where moved to the bin. Thought they where deleted for real :p.
Should I just try to remove the nodes from the umbracoNode table and see what happens or anyone got a better idea :).
Jeroen
Having the same problem here. Node is NOT on recycle bin, NOT on tree, but appears in Sort dialog and is published when I republish the website.
Using 4.6.1.
I still haven't found a solution for this...
I created a workitem for it: http://umbraco.codeplex.com/workitem/30154.
Jeroen
Thanks.
Just spent the last hour working on this. Apparently was an entry in cmsContentVersion that didn't have a match anywhere else. Deleted it and everything is fine.
I did try the Content Management package, and that's how I found the orphaned version. The package found the node, but couldn't delete or unpublish it due to missing content version.
Another strange this, there were 2 versions for the problematic document with an updateDate different by only 100 ms. Strange.
Only removing the cmsContentVersion data didn't work for me. I used this query to delete all the node data:
I did this for the duplicated nodes (id 1616 and 1620) and now they're gone. I can't find them when sorting or in the Content Maintance dashboard or in the umbraco.config after a republish. Seems this solved it for me.
Jeroen
This problem (node not appearing in tree or recycle bin, but present in Sort dialog) occurred today for me when simply refreshing the admin page (Running Umbraco 4.0.4.2). It was very disconcerting that the main node below "Content" disappeared, especially since all the site contents was under it. I didn't want to risk problems by deleting a cmsContentVersion record, so instead I updated the VersionDate for the last record for the node to have a date before the next to last version. This resolved the problem so that the main node appeared again in the Ubraco admin.
-- Last two records:
-- id ContentId VersionId VersionDate
-- 7096 1061 9AA58797-8805-42D5-B7F7-6681FBB22677 2012-10-23 10:05:23.520
-- 7097 1061 5A97DECC-73D7-47DF-A1AC-A48898907BE9 2012-10-23 10:05:39.270
UPDATE [UmbracoDB].[dbo].[cmsContentVersion]
SET [VersionDate] = '2012-10-23 10:05:20.270'
WHERE id = 7097 AND ContentId = 1061
I used this SQL to find the node id's to delete - just replace the parent id of the node that you cant sort childs for:
SELECT id from umbracoNode
WHERE parentID = 1170
AND id NOT IN (
SELECT DISTINCT doc.nodeId
FROM cmsDocument AS doc
LEFT OUTER JOIN umbracoNode AS node ON doc.nodeId = node.id
WHERE node.parentID = 1170)
I am having the same issue.
My problem is that it does not seem to be limited to a certain node, but rather randomly throughout the node structure in various unreleated places. Any ideas on a script that can Identify and fix all the problems? Or rather at least one that can find all the problems without providing a node id?
If anybody is curious, here is what Umbraco does to delete nodes by their ID: https://github.com/umbraco/Umbraco-CMS/blob/eae00873073f20c60e355ec6e95ff6259ad2652b/src/Umbraco.Core/Persistence/Repositories/ContentRepository.cs#L154
It also does a few other things you may want to look into (unpublishing, handling child nodes, and so on).
is working on a reply...