ImageManager javascript error on empty directories

4 posts, 0 answers
  1. Colin
    Colin avatar
    1 posts
    Member since:
    Mar 2012

    Posted 15 Mar 2012 Link to this post

    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?
  2. Rumen
    Admin
    Rumen avatar
    14351 posts

    Posted 16 Mar 2012 Link to this post

    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.
  3. Ryan
    Ryan avatar
    4 posts
    Member since:
    Sep 2010

    Posted 22 Mar 2012 Link to this post

    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?
  4. Rumen
    Admin
    Rumen avatar
    14351 posts

    Posted 22 Mar 2012 Link to this post

    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.
Back to Top