Copied to clipboard

Flag this post as spam?

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


  • Logan P. 47 posts 217 karma points
    Aug 11, 2014 @ 20:01
    Logan P.
    0

    Trouble with Image Cropper 7.1.4

    Hello all,

    So I have been having trouble with the image cropper built into Umbraco 7.1.4 (I recently upgraded from 7.1.1 where we were having the same error). I have an image cropper with several defined crop sizes. Whenever I upload a image, it works perfectly. The problem arises whenever I adjust the focal point or crop area and then save. At this point, the GetCropUrl extension method returns a url like this: http://umbraco.scylla.local/media/1183/1-wide.jpg?crop=0.0000000000000001263187085796,0.00036783001925685472,-0.0000000000000002526374171591,0.0000000000000001229651145465&cropmode=percentage&width=818&height=210&rnd=130522310740000000

    This will return a 500 server error with the YSOD with the stack trace:

    [IndexOutOfRangeException: Index was outside the bounds of the array.] ImageProcessor.Processors.Crop.MatchRegexIndex(String queryString) +629 ImageProcessor.Web.<>cDisplayClass5.1(IGraphicsProcessor x) +35 System.Linq.WhereListIterator1.MoveNext() +165 System.Linq.Buffer1..ctor(IEnumerable1 source) +520 System.Linq.<GetEnumerator>d__0.MoveNext() +252 System.Collections.Generic.List1..ctor(IEnumerable1 collection) +536 System.Linq.Enumerable.ToList(IEnumerable1 source) +80 ImageProcessor.Web.ImageFactoryExtensions.AutoProcess(ImageFactory factory) +389 ImageProcessor.Web.HttpModules.

    Whenever the cropper works (before adjusting any crops), it will return an url like this: http://umbraco.scylla.local/media/1183/1-wide.jpg?center=0.38834951456310679,0.4075&mode=crop&width=2200&height=565&rnd=130522310740000000

    My ImageProcessor.dll is version 1.8.8.0 and my ImageProcessor.Web.dll is version 3.2.2.0.

    I have exhausted all of my knowledge on what could be going on. Obviously, it looks like ImageProcessor is having trouble parsing the query string that is produced by GetCropUrl.

    Any help on this would be greatly appreciated. Thanks so much!

  • Jeavon Leopold 3072 posts 13628 karma points MVP 10x admin c-trib
    Aug 11, 2014 @ 20:18
    Jeavon Leopold
    1

    Hi Logan,

    A couple of strange things here, you have a minus coordinate in your crop coordinates, this is not possible in v7.1.4 but was a bug in a older version. Also Umbraco v7.1.4 ships with a minimum version of 1.9.0 of ImageProcessor (although I would recommend the latest v1.9.4). Both of these make be wonder if your upgrade did complete properly, was it a manual upgrade or NuGet?

    Jeavon

  • Logan P. 47 posts 217 karma points
    Aug 11, 2014 @ 20:34
    Logan P.
    0

    Hey Jeavon, thanks for the speedy reply!

    It was a manual upgrade from 7.1.1. I copied the /bin, /umbraco and /umbraco_client folders. That is very strange that 7.1.4 ships with ImageProcessor > 1.9 because whenever I look at the dll inside my UmbracoCms.7.1.4 folder that I downloaded, it has the 1.8.8 dll.

    I will try removing all references to the old image processor and get the latest version and see if that remedies the problem.

    I will let you know the results.

    Thanks! Logan

  • Jeavon Leopold 3072 posts 13628 karma points MVP 10x admin c-trib
    Aug 11, 2014 @ 20:42
    Jeavon Leopold
    100

    Good idea! You will still have the issue with the minus coordinates, I would really make sure that the JS cache is totally cleared and then try to set and save one of these crops.

  • Logan P. 47 posts 217 karma points
    Aug 11, 2014 @ 23:39
    Logan P.
    0

    Ok so an update, I reinstalled umbraco 7.1.4 which still had the 1.8.8 ImageProcessor.dll so I downloaded the latest version (1.9.5.0 & also updated ImageProcessor.Web.dll) and it now works! No more minus coordinates as well. Thank you so much Jeavon! You saved me many hours of fooling around.

  • Jeavon Leopold 3072 posts 13628 karma points MVP 10x admin c-trib
    Aug 12, 2014 @ 16:07
    Jeavon Leopold
    0

    Great it's working for you now!

Please Sign in or register to post replies

Write your reply to:

Draft