Copied to clipboard

Flag this post as spam?

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


  • Paul 184 posts 646 karma points
    Jul 10, 2019 @ 11:54
    Paul
    0

    Umbraco 7.15 - Media folders not appearing in the tree

    Hi all,

    I've upgraded a site through various Umb versions, up to 7.15 and now I've got a strange issue.

    Within the back office when I view the media section, I can't see the folders in the tree view on the left hand side, only the media items that aren't in the folders. The right hand pane however shows the media folders and the files(so the right hand pane is acting normally). I've tried republishing, rebuilding the indexes etc, but still no joy.

    The media folders also do not display when I use any of the inbuilt editors to add images to a page, but the images that aren't in folders do display. So I'm literally just missing the folders.

    The folders exist on both the server and within the database and are correctly pointing the folder content type.

    Within the media section I can 'sort' the folders and they show up, but sorting them doesn't make them show up within the tree.

    One final bit of odd behaviour is when I create a new folder this does display in the tree, it also uses the correct content type in the db, which is the same as the folders which aren't displaying. I've spent quite a while looking at the db and can't see any real differences between the new folders I add, which display, and the pre-upgrade ones which do not.

    I do see an error in the logs, but I'm not sure if it's related to the media issue:

        ERROR Umbraco.Core.UmbracoApplicationBase - An unhandled exception occurred
    System.IO.PathTooLongException: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
    

    Does anyone have any other ideas on what I can do to bring these back to life?

    *when using the search at the top of the tree it can find the folders BTW, they're just not displayed below.

  • Paul 184 posts 646 karma points
    Jul 10, 2019 @ 14:47
    Paul
    0

    Ahh new error now showing, does this mean it's Imageprocessor that is my issue? I can't uninstall it, nor change the version as Umb7.15 is dependent on it.

     2019-07-10 15:02:58,122 [P8776/D2/T9] ERROR Umbraco.Core.UmbracoApplicationBase - An unhandled exception occurred
    System.IO.PathTooLongException: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
       at System.IO.PathHelper.GetFullPathName()
       at System.IO.Path.LegacyNormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)
       at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)
       at System.IO.Path.GetFullPathInternal(String path)
       at System.Security.Util.StringExpressionSet.CanonicalizePath(String path, Boolean needFullPath)
       at System.Security.Util.StringExpressionSet.CreateListFromExpressions(String[] str, Boolean needFullPath)
       at System.Security.Permissions.FileIOPermission.AddPathList(FileIOPermissionAccess access, AccessControlActions control, String[] pathListOrig, Boolean checkForDuplicates, Boolean needFullPath, Boolean copyPathList)
       at System.Security.Permissions.FileIOPermission..ctor(FileIOPermissionAccess access, String path)
       at System.Web.InternalSecurityPermissions.PathDiscovery(String path)
       at System.Web.Hosting.HostingEnvironment.MapPath(VirtualPath virtualPath)
       at System.Web.Hosting.HostingEnvironment.MapPath(String virtualPath)
       at ImageProcessor.Web.HttpModules.ImageProcessingModule.<ProcessImageAsync>d__31.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at System.Web.TaskAsyncHelper.EndTask(IAsyncResult ar)
       at System.Web.HttpApplication.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
       at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
       at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
    
  • Paul 184 posts 646 karma points
    Jul 10, 2019 @ 15:41
    Paul
    0

    And now in the console we get

    Could not find the tree media, activeTree has not been set
    
  • Lee 1130 posts 3088 karma points
    Jul 11, 2019 @ 09:18
    Lee
    0

    Yes I get this issue too. Just upgraded myself to v7.15. Only affects my site using the UmbracoFileSystemProviders.Azure plugin.

  • Paul 184 posts 646 karma points
    Jul 11, 2019 @ 09:23
    Paul
    0

    Ok so it's a 7.15 problem then. I feel slightly better about that. That'll teach me for upgrading so quickly after a release.

  • Lee 1130 posts 3088 karma points
    Jul 11, 2019 @ 09:27
    Lee
    0

    Yep I only upgraded because of the security release.

    I think it's to do with the UmbracoFileSystemProviders.Azure plugin as I upgraded another 3 sites and they are fine. It's only affected the media folders for the site using that azure media plugin.

    I've pinged Jeavon and James on Twitter in case they had seen this, and asked Seb if there was a change in to the alllowed file lengths/names for media items.

  • Paul 184 posts 646 karma points
    Jul 11, 2019 @ 09:30
    Paul
    0

    Mine isn't using the Azure plugin and suffers with the issue, although, ironically, the work to upgrade it is to get it ready to sit on Azure.

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Jul 11, 2019 @ 09:34
    Sebastiaan Janssen
    0

    Very strange, I can't imagine anything changes that might have caused this.

    Can any of you post a full log file (or email it to sj @ umbraco.dk) ? Preferably with Debug level set to <add key="serilog:minimum-level" value="Debug" /> so we have more info.

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Jul 11, 2019 @ 09:36
    Sebastiaan Janssen
    0

    Whoops, it's v7, <priority value="Debug"/> in the log4net.config file I mean. ;-)

  • Lee 1130 posts 3088 karma points
    Jul 11, 2019 @ 10:12
    Lee
    0

    I'm not seeing any errors in my log. Will email you regardless.

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Jul 11, 2019 @ 10:13
    Sebastiaan Janssen
    1

    Seems to be a javascript error, I'm hearing back from another test.

  • Lee 1130 posts 3088 karma points
    Jul 11, 2019 @ 10:22
    Lee
    0

    I'm not seeing any JS errors in my console

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Jul 11, 2019 @ 10:23
    Jeavon Leopold
    1

    I only saw the js errors when navigating the media via the list view

  • Lee 1130 posts 3088 karma points
    Jul 11, 2019 @ 10:24
    Lee
    0

    Actually you might be right. The tree isn't showing the items but the main window/listview IS showing the folders.

  • Lee 1130 posts 3088 karma points
    Jul 11, 2019 @ 10:26
    Lee
    0

    Although it's reassuring to still see the folders in the main view/list view. No pickers work :(

  • Lee 1130 posts 3088 karma points
    Jul 11, 2019 @ 10:20
    Lee
    0

    Replied via email. But I have zero errors in my log which is weird.

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Jul 11, 2019 @ 10:59
    Sebastiaan Janssen
    0

    Ah yes, looks like a server side issue after all, but not with any errors reported. How old are these websites originally? I have tried with a 7.12 site and that worked but I can repro on a really old site that has been upgraded over the years.

  • Søren Kottal 713 posts 4571 karma points MVP 6x c-trib
    Jul 11, 2019 @ 11:02
    Søren Kottal
    0

    I have a site from 2016, which I just upgraded from 7.5.9 to 7.15 that has the same problem.

    I can see 7.15 has some changes in the EntityRepository, that might be the problem (don't know how though). https://github.com/umbraco/Umbraco-CMS/commit/23b8e1cce8107aabd8ba5ebbcb0a3ee33aff212d#diff-f0fb88312c00e357c11d8d36264524d3

    Based on the fact that both the treecontroller and the entityService API returns no folders.

  • Paul 184 posts 646 karma points
    Jul 11, 2019 @ 11:03
    Paul
    0

    No errors in the logs for me either, despite me trying to get it to happen for the purpose of sending a log file over.

    I do, occasionally get javascript errors that have pointed to lib/angular 1.1.5, when these happen the console message is generally:

    Could not find the tree media, activeTree has not been set
    

    I also get a similar message about tree users and active tree when I tried to set the media start node on a group. When I set a start node to be one of the folders which isn't displaying Umb will save it, but on refresh of the page it's then blank again.

    @Seb, the site I upgraded was a 7.14 site when I applied 7.15, but it's migration history is thus: 7.2.8 > 7.7.6 > 7.7.13 > 7.9.6 > 7.11.2 > 7.14 > 7.15

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Jul 11, 2019 @ 11:52
    Sebastiaan Janssen
    104

    Thanks everyone, I tracked the error down to a problematic query, follow the progress here: https://github.com/umbraco/Umbraco-CMS/issues/5848

  • Genc Kastrati 86 posts 401 karma points
    Jul 11, 2019 @ 13:39
    Genc Kastrati
    0

    Thank you Seb. Confirming this is a problem on our install as well, on the Cloud.

  • Paul 184 posts 646 karma points
    Jul 16, 2019 @ 11:43
    Paul
    0

    Thanks Seb, I ran the sql mentioned in there and it's sorted it out.

  • Genc Kastrati 86 posts 401 karma points
    Jul 17, 2019 @ 08:22
    Genc Kastrati
    0

    Hi Paul, did you run it on the Umbraco Cloud?

  • Lee 1130 posts 3088 karma points
    Jul 11, 2019 @ 12:35
    Lee
    0

    Thanks for tracking it down Seb.

  • Anders Brohäll 295 posts 561 karma points c-trib
    Jul 22, 2019 @ 10:15
    Anders Brohäll
    0

    About the SQL-fix uggested in https://github.com/umbraco/Umbraco-CMS/issues/5848.

     DECLARE @i int
     DECLARE @nodeId int
     DECLARE @numrows int
     DECLARE @versionId varchar(50)
     DECLARE @rootNodes TABLE (
         idx smallint Primary Key IDENTITY(1,1)
         , NodeId int
     )
    
     INSERT @rootNodes
     SELECT id FROM umbracoNode WHERE nodeObjectType = 'B796F64C-1F99-4FFB-B886-4BF4BC011A9C' AND id NOT IN (SELECT nodeId FROM cmsMedia)
    
     SET @i = 1
     SET @numrows = (SELECT COUNT(*) FROM @rootNodes)
     IF @numrows > 0
         WHILE (@i <= (SELECT MAX(idx) FROM @rootNodes))
         BEGIN
    
             SET @nodeId = (SELECT NodeId FROM @rootNodes WHERE idx = @i)
    
             --Do something with Id here
             SET @versionId = (SELECT TOP 1 VersionId FROM cmsContentVersion WHERE ContentId = @nodeId ORDER BY VersionDate DESC)
            PRINT(@versionId)
            PRINT(@nodeId)
            INSERT INTO cmsMedia(nodeId, versionId) VALUES(@nodeId, @versionId)
    
             SET @i = @i + 1
         END
    

    Do notice that parentId = -1 has been removed from the original post, suggested by Lee (@YodasMyDad) in the Issue.

    Does it (still) work for you? Any complications?

    I am concerned since there is no traceability what so ever if we run the TSQL.

    Preferred case would of course be if Umbraco made an official patch. Please do :)

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Jul 22, 2019 @ 10:18
    Sebastiaan Janssen
    0

    Yes, removing the parentId is just fine.

    Make a dump of whatever is in the cmsMedia table before you run this SQL (a backup of the database is even better) and compare the result afterwards. The only changes that will happen when running that SQL is inserts into cmsMedia.

    Of course we're working on a patch release. :)

  • Anders Brohäll 295 posts 561 karma points c-trib
    Jul 22, 2019 @ 10:20
    Anders Brohäll
    0

    Good!

    "A 7.15.1 release will have to wait a little longer." made me think otherwise about the patch. : )

  • Anders Brohäll 295 posts 561 karma points c-trib
    Aug 01, 2019 @ 08:05
    Anders Brohäll
    0

    Thank you for the release! : )

Please Sign in or register to post replies

Write your reply to:

Draft