Deleted Items are still exist in Content's Sort List
dear Professionals ;)
I have recently upgraded my Umbraco to 4.6 and now I have some difficulties in sorting items.
When I click on SORT option in content tree, numbers of deleted items appears in the sort list while they are not existing anymore in the content tree!
These deleted items cause problems in sorting, they sound kept their sortOrder and when I am adding a new item, The new items might have same sortOrder value. in this case, Sorting is not working anymore.
I am sure that it is NOT Caching promlems!!!
Also I checked the Umbraco.Config file and those deleted items are not existing there!!!
Hello, strangely I have just seen this issue in two different Umbraco 4.6.1 installations, there is a unsolved work item on CodePlex http://umbraco.codeplex.com/workitem/29160
The best way I found for these sort of problems is delete all items in recycle-bin first then delete trashed items in database using following query:
DECLARE @nodeId int
SET @nodeId = 0
SELECT id INTO #nodes FROM umbracoNode WHERE (path like '%-20%' AND id != -20 AND @nodeId = 0) OR (id = @nodeId)
SELECT COUNT(*) FROM #nodes
-- Pulled from Umbraco.Core.Persistence.Repositories.GetDeleteClauses() DELETE FROM umbracoUser2NodeNotify WHERE nodeId IN (SELECT id FROM #nodes) DELETE FROM umbracoUser2NodePermission WHERE nodeId IN (SELECT id FROM #nodes) DELETE FROM umbracoRelation WHERE parentId IN (SELECT id FROM #nodes) DELETE FROM umbracoRelation WHERE childId IN (SELECT id FROM #nodes) DELETE FROM cmsTagRelationship WHERE nodeId IN (SELECT id FROM #nodes) DELETE FROM umbracoDomains WHERE domainRootStructureID IN (SELECT id FROM #nodes) DELETE FROM cmsDocument WHERE NodeId IN (SELECT id FROM #nodes) DELETE FROM cmsPropertyData WHERE contentNodeId IN (SELECT id FROM #nodes) DELETE FROM cmsPreviewXml WHERE nodeId IN (SELECT id FROM #nodes) DELETE FROM cmsContentVersion WHERE ContentId IN (SELECT id FROM #nodes) DELETE FROM cmsContentXml WHERE nodeID IN (SELECT id FROM #nodes) DELETE FROM cmsContent WHERE NodeId IN (SELECT id FROM #nodes) --ALTER TABLE umbracoNode NOCHECK CONSTRAINT FK_umbracoNode_umbracoNode_id --Hopefully not needed DELETE FROM umbracoNode WHERE id IN (SELECT id FROM #nodes) --ALTER TABLE umbracoNode CHECK CONSTRAINT FK_umbracoNode_umbracoNode_id DROP TABLE #nodes
Deleted Items are still exist in Content's Sort List
dear Professionals ;)
I have recently upgraded my Umbraco to 4.6 and now I have some difficulties in sorting items.
When I click on SORT option in content tree, numbers of deleted items appears in the sort list while they are not existing anymore in the content tree!
These deleted items cause problems in sorting, they sound kept their sortOrder and when I am adding a new item, The new items might have same sortOrder value. in this case, Sorting is not working anymore.
I am sure that it is NOT Caching promlems!!!
Also I checked the Umbraco.Config file and those deleted items are not existing there!!!
I also tried to REPUBLISH ENTIRE SITE!
Please find below a snapshot of my sort list:
Hi Amir
what version of Umbraco are you using?
If you open the umbraco.config file (the XML cache) can you then find the deleted pages in there?
/Jan
Hi Jan
Thanks for your reply;
As I said in my first post, the umbraco version is : umbraco v 4.6.1
And again, as I said in my post ------> Also I checked the Umbraco.Config file and those deleted items are not existing there!!!
Hi Amir,
Anything strange going on in your umbracoLog table? Maybe also check around the time you deleted the pages for any errors?
-Tom
Hello, strangely I have just seen this issue in two different Umbraco 4.6.1 installations, there is a unsolved work item on CodePlex http://umbraco.codeplex.com/workitem/29160
Does anyone know if this is fixed in 4.7?
Jeavon
The best way I found for these sort of problems is delete all items in recycle-bin first then delete trashed items in database using following query:
DECLARE @nodeId int
SET @nodeId = 0
SELECT id INTO #nodes FROM umbracoNode WHERE (path like '%-20%' AND id != -20 AND @nodeId = 0) OR (id = @nodeId)
SELECT COUNT(*) FROM #nodes
-- Pulled from Umbraco.Core.Persistence.Repositories.GetDeleteClauses()
DELETE FROM umbracoUser2NodeNotify WHERE nodeId IN (SELECT id FROM #nodes)
DELETE FROM umbracoUser2NodePermission WHERE nodeId IN (SELECT id FROM #nodes)
DELETE FROM umbracoRelation WHERE parentId IN (SELECT id FROM #nodes)
DELETE FROM umbracoRelation WHERE childId IN (SELECT id FROM #nodes)
DELETE FROM cmsTagRelationship WHERE nodeId IN (SELECT id FROM #nodes)
DELETE FROM umbracoDomains WHERE domainRootStructureID IN (SELECT id FROM #nodes)
DELETE FROM cmsDocument WHERE NodeId IN (SELECT id FROM #nodes)
DELETE FROM cmsPropertyData WHERE contentNodeId IN (SELECT id FROM #nodes)
DELETE FROM cmsPreviewXml WHERE nodeId IN (SELECT id FROM #nodes)
DELETE FROM cmsContentVersion WHERE ContentId IN (SELECT id FROM #nodes)
DELETE FROM cmsContentXml WHERE nodeID IN (SELECT id FROM #nodes)
DELETE FROM cmsContent WHERE NodeId IN (SELECT id FROM #nodes)
--ALTER TABLE umbracoNode NOCHECK CONSTRAINT FK_umbracoNode_umbracoNode_id --Hopefully not needed
DELETE FROM umbracoNode WHERE id IN (SELECT id FROM #nodes)
--ALTER TABLE umbracoNode CHECK CONSTRAINT FK_umbracoNode_umbracoNode_id
DROP TABLE #nodes
is working on a reply...