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

Two errors in the Editor Image Manager when working w/ 3rd party images

3 Answers 143 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Mark Kucera
Top achievements
Rank 1
Mark Kucera asked on 11 Mar 2014, 05:16 PM
Hey guys we are running into two issues with the image manager and images hosted on external sites.  I've put together a demo video here that clearly shows both issues, but i will also write it out for others who come upon this post.

http://images.publicaster.com/ImageLibrary/Account116/Documents/ImageManagerIssue.mp4

For this demonstration, i'm using the latest version of the Telerik Ajax controls, v2013.3.1324.40, and i do specify a reference to the Editor Dialogs in my control declaration.

1.<telerik:RadEditor ID="EMailContentEditor" runat="server"  Width="95%" ContentFilters="RemoveScripts,IndentHTMLContent"
2.  ConvertToXhtml="false" ConvertFontToSpan="false" ExternalDialogsPath="/EditorDialogs"
3.    EditModes="Design,Html" Height="600px" OnClientCommandExecuting="OnClientCommandExecuting"
4.     OnClientLoad="OnClientLoad" >


If you select an image in the editor that is hosted on a 3rd party, and then click the image manager icon in the editor, you get a message that says
"You are trying to navigate to a non-existing folder or you do not have proper permissions to view this folder.  Please, contact the administrator."

As you can see from my video, the image is hosted on a 3rd party site. I would like to know how i can disable this error message. 

If i click the "OK" button then  the image manager loads and i can see all the images in my image library.

The second issue is that i am unable to easily replace this image that is hosted on a 3rd party site with an image from my image library.  To reproduce,

1. select an image in the editor that is hosted on a 3rd party site.
2. click the image manager icon
3. click ok to dismiss the "non-existing folder" message
4. select any existing image from my image library
5. click insert button in the image library dialog

When you follow these steps, nothing happens.  the original image is still in place and the image i selected from the library is nowhere to be found.

I can workaround this issue by first deleting the image hosted on a 3rd party site and then inserting a new image from the image library.  This problem does not exist if i use an image that is already in my image library and replace it with an image in my image library.

Please advise how i can remedy these two issues.

Thanks
-Mark



3 Answers, 1 is accepted

Sort by
0
Vessy
Telerik team
answered on 13 Mar 2014, 04:41 PM
Hello Mark ,

Thank you for the detailed explanation and the video demonstration of the issue - it was really helpful.

As per your assumption, the first issue is caused by the fact the selected image is not located in the folders listed in the ImageManager. The reason behind this behavior is that by design, when an image is selected into the RadEditor control and after that the user opens the ImageManager dialog, RadEditor tries to navigate to the selected image. This functionality is achieved by setting the path of the pre-selected image as a value of the FileExplorer's InitialPath property. In scenarios where the path to the selected image is non-virtual (e.g., a URL) FileExplorer cannot find it in its ViewPaths (the ImageManager's ViewPaths) and so the error message is thrown. This behavior can be avoided by following the approach described in this forum tread.

Regarding the second reported issue - we are not aware of it and unfortunately I was not able to reproduce it on my side neither with the mentioned by you version of the controls (2013.3.1324.40) nor the latest one (2014.1.225.40). Could provide more details on the specific scenario?
  • Are you able to reproduce the same issue into our online demos, where the latest version of the controls is used? - Editor demos
  • Could you take a look over the video from my test here and see whether I am not leaving anything out?
  • Could you disable the external dialogs of the Editor and try to reproduce the issue again?
  • It would be really helpful if you isolate the issue into a sample fully runnable project, so we could isolate it locally. Detailed explanation on how to do so are available here: Isolating a problem in a sample project

Looking forward to hearing from you,
Vessy
Telerik
 

DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.

 
0
Mark Kucera
Top achievements
Rank 1
answered on 17 Mar 2014, 09:58 PM
Vessy, thanks for your reply.  It seems that both of my issues might have been related.    I implemented the solution found here
that you pointed me too.  For anyone else reading this it's important to also read this post that explains how you need to put your custom code into a new control instead of directly in the FileBrowser.ascx control.  I spent about 30 minutes trying to get the later to work unsuccessfully.  Once i found the post about using the new user control, that worked perfectly.  I made some minor adjustments to

protected void radFileExplorer1_Load(object sender, EventArgs e)

my method looks like this:

1.protected void radFileExplorer1_Load(object sender, EventArgs e)
2.{
3.    if (!System.IO.File.Exists(Server.MapPath((sender as Telerik.Web.UI.RadFileExplorer).InitialPath)))
4.    {
5.        (sender as Telerik.Web.UI.RadFileExplorer).InitialPath = "";
6.    }
7.}

which seems like it will give me the best of both worlds.  Local images will work the same way they work before, and external images won't try to "auto load" and give me the alert prompt. 

After i implemented this update i was unable to replicate my 2nd issue.  I had no problems selecting an image from my library and replacing the external image.

Thanks for your help!
-Mark
0
Vessy
Telerik team
answered on 18 Mar 2014, 03:44 PM
Hi Mark,

I am glad that you have managed to achieve the desired behavior of the control. Thank you for you explanations and guidance, I believe they will be helpful for other users facing the same issue.

I will be at your disposal in case any further questions appear.

Regards,
Vessy
Telerik
 

DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.

 
Tags
Editor
Asked by
Mark Kucera
Top achievements
Rank 1
Answers by
Vessy
Telerik team
Mark Kucera
Top achievements
Rank 1
Share this question
or