Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Adrian Alexa 50 posts 100 karma points
    Jan 10, 2012 @ 09:26
    Adrian Alexa
    0

    Length cannot be less than zero. Parameter name: length

    This might appear to be weird to you as it is for me but i don't find any solution :|

    It happens like this:

    Go to content on template insert a macro and then save an publish. Everythinks is fine.

    Reopen and save -> throws an error:

    Length cannot be less than zero.
    Parameter name: length

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.ArgumentOutOfRangeException: Length cannot be less than zero.
    Parameter name: length

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


    Stack Trace:

    [ArgumentOutOfRangeException: Length cannot be less than zero.
    Parameter name: length]
       System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy) +12681562
       umbraco.editorControls.tinyMCE3.TinyMCE.replaceMacroTags(String text) +90
       umbraco.editorControls.tinyMCE3.TinyMCE.Save() +85
       umbraco.controls.ContentControl.saveClick(Object Sender, ImageClickEventArgs e) +185
       System.Web.UI.WebControls.ImageButton.OnClick(ImageClickEventArgs e) +134
       System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument) +165
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3691
    



    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1

  • Tom Fulton 2030 posts 4998 karma points c-trib
    Jan 10, 2012 @ 15:03
    Tom Fulton
    0

    Hi Adrian,

    I can't seem to reproduce this but it does seem to be a common issue.  Here's the bug on codeplex (please vote it up).  http://umbraco.codeplex.com/workitem/30620

    How are you reproducing this - what browser, what content does your macro contain, etc?  If reproducable maybe we can submit the code on that workitem as a pull request :)

    -Tom

  • Cameron 23 posts 42 karma points
    May 18, 2012 @ 01:31
    Cameron
    0

    Hi Adrian,

    I also encountered this annoying little critter last night. I'm using umbraco v 4.7.2 (Assembly version: 1.0.4500.21031)

    After messign around with it for a while, I discovered finally this morning that if I set Render content in editor within the macro settings to No then the problem seemed to go away.

    A pathetic little work around, but at least I was able to move on. Hopefully it may assist you and/or your users as well

    Cheers,

    Cameron

  • Simon Dingley 1474 posts 3431 karma points c-trib
    Jun 24, 2012 @ 21:50
    Simon Dingley
    0

    I too had this issue last week and the only workaround I found was also to disabled rendering of macro content in the RTE. What little debugging I did leads me to believe the issue is content related (rendered content) rather than an actual bug in Umbraco. 

Please Sign in or register to post replies

Write your reply to:

Draft