Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Craig Noble 41 posts 584 karma points c-trib
    Apr 01, 2014 @ 11:17
    Craig Noble
    0

    Content tree only displays the Recycle bin and no content

    Hi all,

    I'm currently running Umbraco v.6.1.6 and for some reason the Content tree is only displaying the Recycle bin.  I have checked the ajax call to the TreeService asmx and only the recycle bin is being returned in the JSON.  The media tree is working perfectly though.

    I am getting the following error (from the log):

    --------------------------------------------------------------------------------

    2014-04-01 10:06:53,765 [41] INFO  umbraco.BusinessLogic.Log - [Thread 31] Log scrubbed.  Removed all items older than 2014-01-31 10:06:53

    2014-04-01 10:06:53,767 [41] INFO  Umbraco.Core.UmbracoApplicationBase - [Thread 31] Application shutdown. Reason: BinDirChangeOrDirectoryRename

    2014-04-01 10:06:55,926 [23] INFO  Umbraco.Core.PluginManager - [Thread 24] Determining hash of code files on disk

    2014-04-01 10:06:55,936 [23] INFO  Umbraco.Core.PluginManager - [Thread 24] Hash determined (took 6ms)

    2014-04-01 10:06:55,944 [23] INFO  Umbraco.Core.PluginManager - [Thread 24] Starting resolution types of umbraco.interfaces.IApplicationStartupHandler

    2014-04-01 10:06:56,000 [23] INFO  Umbraco.Core.PluginManager - [Thread 24] Completed resolution of types of umbraco.interfaces.IApplicationStartupHandler, found 0 (took 55ms)

    2014-04-01 10:06:56,000 [23] ERROR Umbraco.Core.UmbracoApplicationBase - [Thread 24] An unhandled exception occurred

    System.TypeLoadException: Could not load type 'Umbraco.Web.Models.Trees.MenuItem' from assembly 'umbraco, Version=1.0.5021.24870, Culture=neutral, PublicKeyToken=null'.

       at System.Reflection.RuntimeAssembly.GetExportedTypes(RuntimeAssembly assembly, ObjectHandleOnStack retTypes)

       at System.Reflection.RuntimeAssembly.GetExportedTypes()

       at Umbraco.Core.TypeFinder.GetTypesWithFormattedException(Assembly a)

       at Umbraco.Core.TypeFinder.GetClasses(Type assignTypeFrom, IEnumerable`1 assemblies, Boolean onlyConcreteClasses, Func`2 additionalFilter)

       at Umbraco.Core.TypeFinder.GetClasses(Type assignTypeFrom, IEnumerable`1 assemblies, Boolean onlyConcreteClasses, Func`2 additionalFilter)

       at Umbraco.Core.TypeFinder.FindClassesOfType[T](IEnumerable`1 assemblies, Boolean onlyConcreteClasses)

       at Umbraco.Core.TypeFinder.FindClassesOfType[T](IEnumerable`1 assemblies)

       at Umbraco.Core.PluginManager.<ResolveTypes>b__1c[T]()

       at Umbraco.Core.PluginManager.LoadViaScanningAndUpdateCacheFile[T](TypeList typeList, TypeResolutionKind resolutionKind, Func`1 finder)

       at Umbraco.Core.PluginManager.ResolveTypes[T](Func`1 finder, TypeResolutionKind resolutionType, Boolean cacheResult)

       at Umbraco.Core.PluginManager.ResolveTypes[T](Boolean cacheResult)

       at Umbraco.Core.CoreBootManager.InitializeApplicationEventsResolver()

       at Umbraco.Web.WebBootManager.InitializeApplicationEventsResolver()

       at Umbraco.Core.CoreBootManager.Initialize()

       at Umbraco.Web.WebBootManager.Initialize()

       at Umbraco.Core.UmbracoApplicationBase.StartApplication(Object sender, EventArgs e)

       at Umbraco.Core.UmbracoApplicationBase.Application_Start(Object sender, EventArgs e)

    2014-04-01 10:07:06,010 [23] INFO  Umbraco.Core.UmbracoApplicationBase - [Thread 35] Application shutdown. Reason: InitializationError

    2014-04-01 10:07:11,737 [36] INFO  Umbraco.Core.PluginManager - [Thread 20] Determining hash of code files on disk

    2014-04-01 10:07:11,747 [36] INFO  Umbraco.Core.PluginManager - [Thread 20] Hash determined (took 6ms)

    2014-04-01 10:07:11,751 [36] INFO  Umbraco.Core.PluginManager - [Thread 20] Starting resolution types of umbraco.interfaces.IApplicationStartupHandler

    2014-04-01 10:07:11,761 [36] INFO  Umbraco.Core.PluginManager - [Thread 20] Completed resolution of types of umbraco.interfaces.IApplicationStartupHandler, found 23 (took 9ms)

    2014-04-01 10:07:11,780 [36] INFO  Umbraco.Core.PluginManager - [Thread 20] Starting resolution types of Umbraco.Core.PropertyEditors.IPropertyEditorValueConverter

    2014-04-01 10:07:11,781 [36] INFO  Umbraco.Core.PluginManager - [Thread 20] Completed resolution of types of Umbraco.Core.PropertyEditors.IPropertyEditorValueConverter, found 0 (took 0ms)

    ----------------------------------------------------------------------

    Does anyone know how I can resolve the above exception?

  • Amir 75 posts 224 karma points
    Apr 01, 2014 @ 11:24
    Amir
    0

    Hi Craig,

    I had same problem with V6.1.6 and it turned out that the problem was from the database.I call it Dirty Database!

    It seems that Umbraco for some reason set trashed=1 for some nodes that have children node which the trashed flag is still false!

    I suppose you can not empty you recycle bin (right click and empty recycle bin)? is that right?

  • Craig Noble 41 posts 584 karma points c-trib
    Apr 01, 2014 @ 11:34
    Craig Noble
    0

    Yeah that's correct.  Did you manage to get the content back?

    Thanks!

  • Amir 75 posts 224 karma points
    Apr 01, 2014 @ 11:42
    Amir
    0

    Yes,

    Before tuoching database, could you please run following query against your database:

     

    SELECT *
      FROM [dbo].[umbracoNode]
      Where parentID in (select id from [dbo].[umbracoNode] where trashed = 1) and trashed = 0 and nodeObjectType = 'C66BA18E-EAF3-4CFF-8A22-41B16D66A972'

    - If this query returns any rows, that mean the listed items needed to be updated. Just run an update query to change their "trashed" flag into False then try to reload your contents.

    Update [dbo].[umbracoNode] Set trashed= 0
      Where parentID in (select id from [dbo].[umbracoNode] where trashed = 1) and trashed = 0 and nodeObjectType = 'C66BA18E-EAF3-4CFF-8A22-41B16D66A972'

     

    - If it returns nothing, that means you are safe to remove the trashed items completely with following scripts but please make a backup first :)

     

    I had 4 levels of nodes so I created this script in 4 levels. What it does is deleting the deleted items and let the rest of nodes (items) be on their own.

     
    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)

    --4th level

    DELETE FROM umbracoUser2NodeNotify WHERE nodeId IN (select id from umbracoNode where parentid in (select id from umbracoNode where parentid in (select id from umbracoNode where parentid in( SELECT id FROM #nodes))))
    DELETE FROM umbracoUser2NodePermission WHERE nodeId IN (select id from umbracoNode where parentid in (select id from umbracoNode where parentid in (select id from umbracoNode where parentid in( SELECT id FROM #nodes))))
    DELETE FROM umbracoRelation WHERE parentId IN (select id from umbracoNode where parentid in (select id from umbracoNode where parentid in (select id from umbracoNode where parentid in( SELECT id FROM #nodes))))
    DELETE FROM umbracoRelation WHERE childId IN (select id from umbracoNode where parentid in (select id from umbracoNode where parentid in (select id from umbracoNode where parentid in( SELECT id FROM #nodes))))
    DELETE FROM cmsTagRelationship WHERE nodeId IN (select id from umbracoNode where parentid in (select id from umbracoNode where parentid in (select id from umbracoNode where parentid in( SELECT id FROM #nodes))))
    DELETE FROM umbracoDomains WHERE domainRootStructureID IN (select id from umbracoNode where parentid in (select id from umbracoNode where parentid in (select id from umbracoNode where parentid in( SELECT id FROM #nodes))))
    DELETE FROM cmsDocument WHERE NodeId IN (select id from umbracoNode where parentid in (select id from umbracoNode where parentid in (select id from umbracoNode where parentid in( SELECT id FROM #nodes))))
    DELETE FROM cmsPropertyData WHERE contentNodeId IN (select id from umbracoNode where parentid in (select id from umbracoNode where parentid in (select id from umbracoNode where parentid in( SELECT id FROM #nodes))))
    DELETE FROM cmsPreviewXml WHERE nodeId IN (select id from umbracoNode where parentid in (select id from umbracoNode where parentid in (select id from umbracoNode where parentid in( SELECT id FROM #nodes))))
    DELETE FROM cmsContentVersion WHERE ContentId IN (select id from umbracoNode where parentid in (select id from umbracoNode where parentid in (select id from umbracoNode where parentid in( SELECT id FROM #nodes))))
    DELETE FROM cmsContentXml WHERE nodeID IN (select id from umbracoNode where parentid in (select id from umbracoNode where parentid in (select id from umbracoNode where parentid in( SELECT id FROM #nodes))))
    DELETE FROM cmsContent WHERE NodeId IN (select id from umbracoNode where parentid in (select id from umbracoNode where parentid in (select id from umbracoNode where parentid in( SELECT id FROM #nodes))))
    DELETE FROM umbracoNode WHERE id IN (select id from umbracoNode where parentid in (select id from umbracoNode where parentid in (select id from umbracoNode where parentid in( SELECT id FROM #nodes))))


    -- 3rd level
    DELETE FROM umbracoUser2NodeNotify WHERE nodeId IN (select id from umbracoNode where parentid in (select id from umbracoNode where parentid in( SELECT id FROM #nodes)))
    DELETE FROM umbracoUser2NodePermission WHERE nodeId IN (select id from umbracoNode where parentid in (select id from umbracoNode where parentid in( SELECT id FROM #nodes)))
    DELETE FROM umbracoRelation WHERE parentId IN (select id from umbracoNode where parentid in (select id from umbracoNode where parentid in( SELECT id FROM #nodes)))
    DELETE FROM umbracoRelation WHERE childId IN (select id from umbracoNode where parentid in (select id from umbracoNode where parentid in( SELECT id FROM #nodes)))
    DELETE FROM cmsTagRelationship WHERE nodeId IN (select id from umbracoNode where parentid in (select id from umbracoNode where parentid in( SELECT id FROM #nodes)))
    DELETE FROM umbracoDomains WHERE domainRootStructureID IN (select id from umbracoNode where parentid in (select id from umbracoNode where parentid in( SELECT id FROM #nodes)))
    DELETE FROM cmsDocument WHERE NodeId IN (select id from umbracoNode where parentid in (select id from umbracoNode where parentid in( SELECT id FROM #nodes)))
    DELETE FROM cmsPropertyData WHERE contentNodeId IN (select id from umbracoNode where parentid in (select id from umbracoNode where parentid in( SELECT id FROM #nodes)))
    DELETE FROM cmsPreviewXml WHERE nodeId IN (select id from umbracoNode where parentid in (select id from umbracoNode where parentid in( SELECT id FROM #nodes)))
    DELETE FROM cmsContentVersion WHERE ContentId IN (select id from umbracoNode where parentid in (select id from umbracoNode where parentid in( SELECT id FROM #nodes)))
    DELETE FROM cmsContentXml WHERE nodeID IN (select id from umbracoNode where parentid in (select id from umbracoNode where parentid in( SELECT id FROM #nodes)))
    DELETE FROM cmsContent WHERE NodeId IN (select id from umbracoNode where parentid in (select id from umbracoNode where parentid in( SELECT id FROM #nodes)))
    DELETE FROM umbracoNode WHERE id IN (select id from umbracoNode where parentid in (select id from umbracoNode where parentid in( SELECT id FROM #nodes)))

    -- 2nd level
    DELETE FROM umbracoUser2NodeNotify WHERE nodeId IN (select id from umbracoNode where parentid in( SELECT id FROM #nodes))
    DELETE FROM umbracoUser2NodePermission WHERE nodeId IN (select id from umbracoNode where parentid in( SELECT id FROM #nodes))
    DELETE FROM umbracoRelation WHERE parentId IN (select id from umbracoNode where parentid in( SELECT id FROM #nodes))
    DELETE FROM umbracoRelation WHERE childId IN (select id from umbracoNode where parentid in( SELECT id FROM #nodes))
    DELETE FROM cmsTagRelationship WHERE nodeId IN (select id from umbracoNode where parentid in( SELECT id FROM #nodes))
    DELETE FROM umbracoDomains WHERE domainRootStructureID IN (select id from umbracoNode where parentid in( SELECT id FROM #nodes))
    DELETE FROM cmsDocument WHERE NodeId IN (select id from umbracoNode where parentid in( SELECT id FROM #nodes))
    DELETE FROM cmsPropertyData WHERE contentNodeId IN (select id from umbracoNode where parentid in( SELECT id FROM #nodes))
    DELETE FROM cmsPreviewXml WHERE nodeId IN (select id from umbracoNode where parentid in( SELECT id FROM #nodes))
    DELETE FROM cmsContentVersion WHERE ContentId IN (select id from umbracoNode where parentid in( SELECT id FROM #nodes))
    DELETE FROM cmsContentXml WHERE nodeID IN (select id from umbracoNode where parentid in( SELECT id FROM #nodes))
    DELETE FROM cmsContent WHERE NodeId IN (select id from umbracoNode where parentid in( SELECT id FROM #nodes))
    DELETE FROM umbracoNode WHERE id IN (select id from umbracoNode where parentid in( SELECT id FROM #nodes))

    -- 1st level
    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)

    DELETE FROM umbracoNode WHERE id IN ( SELECT id FROM #nodes)

    DROP TABLE #nodes

Please Sign in or register to post replies

Write your reply to:

Draft