This is a migrated thread and some comments may be shown as answers.

Image Manager does not work after upgrade to 2009.

1 Answer 43 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Alexander
Top achievements
Rank 1
Alexander asked on 30 Sep 2009, 02:37 PM

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 


{Telerik.Web.UI.Widgets.DirectoryItem}
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: ""


Directories
{Telerik.Web.UI.Widgets.DirectoryItem[0]}


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




Files[0]
{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)

1 Answer, 1 is accepted

Sort by
0
Lini
Telerik team
answered on 05 Oct 2009, 09:25 AM
Hi,

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.


Greetings,
Lini
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.
Tags
Editor
Asked by
Alexander
Top achievements
Rank 1
Answers by
Lini
Telerik team
Share this question
or