Image Manager does not work after upgrade to 2009.

2 posts, 0 answers
  1. Alexander
    Alexander avatar
    152 posts
    Member since:
    Jun 2012

    Posted 30 Sep 2009 Link to this post

    Problem in FileBrowserContentProvider.

    we used version 2008_3_1308 of Telerik library. After we started using Q2 2009 Image Manager in Editor and cookieless session, the Image Manager doesn't show any images from DB. But in debug mode ResolveRootDirectoryAsTree returns structure as 

    base {Telerik.Web.UI.Widgets.FileBrowserItem}: {Telerik.Web.UI.Widgets.DirectoryItem}
    Directories: {Telerik.Web.UI.Widgets.DirectoryItem[0]}
    Files: {Telerik.Web.UI.Widgets.FileItem[2]}
    FullPath: ""
    Location: "/"
    Path: ""


    [0]: {Telerik.Web.UI.Widgets.FileItem}
    [1]: {Telerik.Web.UI.Widgets.FileItem}

    base {Telerik.Web.UI.Widgets.FileBrowserItem}: {Telerik.Web.UI.Widgets.FileItem}
    Extension: ".jpg"
    Length: 90911
    Location: ""
    Path: ""
    Url: "http://localhost/site/Pages/ImagePHandler.ashx?RID=7"

    Here is screenshot from Image Manager

    p.s. Changing params in DirectoryItem initialization did a trick (in previous version other set of params worked ok)

  2. Lini
    Lini avatar
    2144 posts

    Posted 05 Oct 2009 Link to this post


    You are on the right track - check your content provider in the places you create the DirectoryItem and FileItem objects:

    if you have something like this in ResolveDirectory(path) :

    return new DirectoryItem(GetName(path), EndWithSlash(GetDirectoryPath(path)), string.Empty, string.Empty, fullPermissions, GetChildFiles(path), directories);

    Then change the third parameter from string.Empty to the current path:

    return new DirectoryItem(GetName(path), EndWithSlash(GetDirectoryPath(path)), path, string.Empty, fullPermissions, GetChildFiles(path), directories);

    The change is similar for the FileItem:

    new FileItem(name, Path.GetExtension(name), (int)childRow["Size"], string.Empty, GetItemUrl(itemFullPath), itemFullPath, fullPermissions));

    should become:

    new FileItem(name, Path.GetExtension(name), (int)childRow["Size"], itemFullPath, GetItemUrl(itemFullPath), string.Empty, fullPermissions));

    You can check the code for our DB content provider in the latest release if you have used it as a base to build your own.

    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top