Copied to clipboard

Flag this post as spam?

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


  • Zakhar 171 posts 397 karma points
    Dec 22, 2011 @ 21:21
    Zakhar
    0

    How to install / use ImageCropper?

    Hey guys,

    I installed Umbraco and trying to figure out how to use image cropper.

    I don't actually know where to start.

    When I add a new property of ImageCropper type to my Document type in Settings and then go to Content and click a node of this document type I'm getting a null reference exception straight away with this stck trace:

     

    [NullReferenceException: Object reference not set to an instance of an object.]
       umbraco.editorControls.imagecropper.DataEditor.OnInit(EventArgs e) +842
       System.Web.UI.Control.InitRecursive(Control namingContainer) +132
       System.Web.UI.Control.InitRecursive(Control namingContainer) +420
       System.Web.UI.Control.InitRecursive(Control namingContainer) +420
       System.Web.UI.Control.InitRecursive(Control namingContainer) +420
       System.Web.UI.Control.InitRecursive(Control namingContainer) +420
       System.Web.UI.Control.AddedControl(Control control, Int32 index) +276
       umbraco.controls.ContentControl.addControlNew(Property p, TabPage tp, String Caption) +3675
       umbraco.controls.ContentControl.CreateChildControls() +1723
       System.Web.UI.Control.EnsureChildControls() +181
       umbraco.controls.ContentControl.OnInit(EventArgs e) +122
       System.Web.UI.Control.InitRecursive(Control namingContainer) +132
       System.Web.UI.Control.AddedControl(Control control, Int32 index) +276
       umbraco.cms.presentation.editContent.OnInit(EventArgs e) +1004
       System.Web.UI.Control.InitRecursive(Control namingContainer) +132
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1969

     

    So I thought may be I need to install ImageCropper package first. When I go to Package repository and try to install ImageCropper package I'm getting this error:

     

    Error - file not found. Could find file named 'C:\www\Umbraco4.7\App_Data\'

    and the stack trace is: 

    [Exception: Error - file not found. Could find file named 'C:\www\Umbraco4.7\App_Data\']
       umbraco.cms.businesslogic.packager.Installer.Import(String InputFile) +651
       umbraco.presentation.developer.packages.Installer.Page_Load(Object sender, EventArgs e) +941
       System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +25
       umbraco.BasePages.BasePage.OnLoad(EventArgs e) +19
       System.Web.UI.Control.LoadRecursive() +71
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3064

    This is defenitely a correct path and I do have App_Data folder. 

    I tried to install another package (ImageGen) and it was installed fine without any problems.

    So, what am I doing wrong and where to start?

    Thank you

     

     

     

  • Zakhar 171 posts 397 karma points
    Dec 22, 2011 @ 21:26
    Zakhar
    0

    Great, now I can't edit my post, getting Error parsing XSLT file: \xslt\forum-commentsList.xslt

    Wanted to add that I installed Umbraco 4.7.1

  • Nigel Wilson 945 posts 2077 karma points
    Dec 22, 2011 @ 22:28
    Nigel Wilson
    0

    Hi Zakhar

    This caught me out when I first used it too !

    You need to go to the "Developer" section, then expand "Data Types". Find the "Image Cropper" datatype and click on it.

    Complete the "General Fields" as follows:

    Property alias = umbracoFile

    Save crop images - tick - when you tick this another field appears re image quality. I have always set it to 90 (equates to 90%)

    Show Label - tick

    Then you are all set. In the "Crops" section you then declare the crops you want available within the site. Enter the details and click the "add" button.

    Finally DO NOT forget to click the save icon (again this is something I sometimes forget to do and you have to re-enter the data - dayum !).

    I hope the above helps...

    Cheers

    Nigel

  • Zakhar 171 posts 397 karma points
    Dec 23, 2011 @ 10:22
    Zakhar
    0

    Thanks Nigel,

    I 've done what you adviced - filled in General section and added a crop.

    What are my next steps? I'm still getting the same exceptions.

    Do I need to install Image Cropper package? Is there a tutorial or some documentation how to use this Umbraco feature?

    Zakhar

  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Dec 23, 2011 @ 12:55
    Jeroen Breuer
    0

    You need to add the cropper to a document type or media type that has a property with the "umbracoFile" alias. The Image and File media type have this by default. In this video you can see how I use DAMP with the Image Cropper: http://www.youtube.com/watch?v=LkcObL7CMvQ.

    Jeroen

  • Craig100 1136 posts 2523 karma points c-trib
    Jun 04, 2012 @ 12:33
    Craig100
    0

    Hi, how did you get around the problem installing Image Cropper? I get the same error messages as above and can't install the package.  I already have ImageGen and DAMP installed if it makes a difference.  It's a new 4.7.1 site running locally on my W7 VM.

    Craig

  • Philip 59 posts 73 karma points
    Jun 20, 2012 @ 08:31
    Philip
    0

    Hi Craig, 

    I had the same issue and just got it to work.

    At the Image Cropper datatype you need to set a Crop, and click add and save.This made it work for me.

  • Craig100 1136 posts 2523 karma points c-trib
    Jun 20, 2012 @ 18:56
    Craig100
    0

    My issue was trying to install the package. Turned out all I need to do was create an image cropper datatype with Image Cropper as the renderer.  Have got crops set now, just can't get hold of them in Razor to ouput to the page. It's VERY frustrating. No replies to forum questions for days:(  Reading forum articles it appears to be extremely difficult to work out how to do it. I'm trying to get a particular crop from a particular image (of two) in child pages. Anyway, that's another post: http://our.umbraco.org/forum/developers/razor/18993-DAMP-concerned-retrieving-Crop-url-@-Sebastiaan

Please Sign in or register to post replies

Write your reply to:

Draft