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

ImageManager javascript error on empty directories

3 Answers 71 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Colin
Top achievements
Rank 1
Colin asked on 15 Mar 2012, 10:37 PM
I'm working with the ImageManager in the RadEditor and run across very simple problem -- uploading an image when the directory currently being viewed is empty causes a javascript error that breaks the ImageManager until the page is reloaded.  However, if the directory isn't empty, everything works fine.

Surely I am doing something wrong, but I've stripped almost everything out of my code and the issue persists.

Here is my markup:
<%@ Page Title="Home Page" Language="vb" MasterPageFile="~/Site.Master" AutoEventWireup="false"
    CodeBehind="Default.aspx.vb" Inherits="ImageMgrTest._Default" %>
    <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <asp:ScriptManager ID="ScriptManagerProxy1" runat="server"/>
   <telerik:RadEditor ID="txtRegText" Width="100%" runat="server"
        DialogHandlerUrl="~/Telerik.Web.UI.DialogHandler.axd"
        StripFormattingOnPaste="MSWord">
        </telerik:RadEditor>
</asp:Content>

And the code behind:
Public Class _Default
    Inherits System.Web.UI.Page
 
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Dim uploadPath As String = "~/uploads"
 
        Me.txtRegText.ImageManager.UploadPaths = {uploadPath}
        Me.txtRegText.ImageManager.ViewPaths = {uploadPath}
        Me.txtRegText.ImageManager.DeletePaths = {uploadPath}
 
        Me.txtRegText.ImageManager.MaxUploadFileSize = 1024 * 1000
        Me.txtRegText.ImageManager.SearchPatterns = New String() {"*.jpg", "*.png", "*.gif", "*.jpeg", "*.bmp", "*.tiff"}
 
    End Sub
 
End Class

If the "/uploads" directory is empty when you go to add an image via the image manager, you get this javascript error after the image is uploaded:

93Uncaught Sys.ArgumentOutOfRangeException: Sys.ArgumentOutOfRangeException: MinimumValue should be smaller than maximumValue Parameter name: _minimumValue Actual value was 0. 

Anyone seen this before?

3 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 16 Mar 2012, 02:46 PM
Hi,

Please, download the latest internal build of RadControls for ASP.NET AJAX from your account and test it? The error should be fixed in it. The issue will not happen in the upcoming Q1 2012 Service Pack 1 release too.

Best regards,
Rumen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Ryan
Top achievements
Rank 1
answered on 22 Mar 2012, 05:12 AM
I am experiencing the same issue.  Are you able to tell me when the SP will be released so that I don't have to use an internal build for production?
0
Rumen
Telerik team
answered on 22 Mar 2012, 02:54 PM
Hello,

Q1 2012 SP1 is scheduled for mid-April.

All the best,
Rumen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Editor
Asked by
Colin
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Ryan
Top achievements
Rank 1
Share this question
or