Copied to clipboard

Flag this post as spam?

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


  • Tim Brooks 27 posts 79 karma points
    Dec 27, 2014 @ 12:40
    Tim Brooks
    0

    Image Cropper not working as designed

    I needed an image cropper for a project, so I went and downloaded a package for it not realized v7 core has it included. I deleted the package and attempted to use the core version by creating a datatype and adding it to document. However, when I select an image I'm left with a blue dot only, no image behind it, and if I hit the x to remove the image I'm just redirected to the main page.

    I have the cropper working fine in a test project. I'm concerned that I may have screwed something up with the cropper package or maybe just this install has been corrupted. Either way, are there any tips on how I could re-initialize or reinstall the image cropper that comes with the v7 core? Maybe take a certain set of files from a clean install and just copy them over? Any help would be appreciated. Thanks

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Dec 27, 2014 @ 12:51
    Jan Skovgaard
    0

    Hi Tim

    Could you perhaps post a screendump of the above issue?

    Also do you see any error messages in your browser console log when uploading/trying to remove the image? And have you checked the /app_data/logs file as well to see if it reveals anything marked with "ERROR" or "WARNING"? Perhaps we can have some clues to figure out what might needs to be done for stuff to work fine again.

    What is the exact version of Umbraco 7 you're using by the way?

    /Jan

  • Tim Brooks 27 posts 79 karma points
    Dec 27, 2014 @ 18:42
    Tim Brooks
    0

    enter image description here

    There is an error in the console

    Error: Syntax Error: Token 'imagesrc' is an unexpected token at column 2 of the expression [/imagesrc] starting at [imagesrc]. at Error (native) at e (http://dev.imediaconnections.com/umbraco/lib/angular/1.1.5/angular.min.js:68:283) at Rc (http://dev.imediaconnections.com/umbraco/lib/angular/1.1.5/angular.min.js:75:188) at http://dev.imediaconnections.com/umbraco/lib/angular/1.1.5/angular.min.js:78:426 at http://dev.imediaconnections.com/umbraco/lib/angular/1.1.5/angular.min.js:43:305 at n (http://dev.imediaconnections.com/umbraco/lib/angular/1.1.5/angular.min.js:7:74) at k (http://dev.imediaconnections.com/umbraco/lib/angular/1.1.5/angular.min.js:43:59) at http://dev.imediaconnections.com/umbraco/lib/angular/1.1.5/angular.min.js:49:406 at k (http://dev.imediaconnections.com/umbraco/lib/angular/1.1.5/angular.min.js:44:382) at http://dev.imediaconnections.com/umbraco/lib/angular/1.1.5/angular.min.js:49:393angular.min.js:63 (anonymous function)

  • Tim Brooks 27 posts 79 karma points
    Dec 27, 2014 @ 18:44
    Tim Brooks
    0

    Umbraco version 7.1.8 assembly: 1.0.5394.16131

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Dec 27, 2014 @ 19:25
    Jeavon Leopold
    0

    Hi Tim,

    Did you switch the property on the document type from the old cropper to the new one?

    Jeavon

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Dec 27, 2014 @ 19:27
    Jeavon Leopold
    0

    If you did, then I would suggest you delete the property, save the document type, then add the property again.

  • Tim Brooks 27 posts 79 karma points
    Dec 27, 2014 @ 19:44
    Tim Brooks
    0

    Hi Jeavon, Not 100% about what you mean by switching from the old one to the new one. What I did was go to developer/data type, create a new one and select Image Cropper as the editor and I add in one cropper size. Just to have a "cleaner slate" I deleted to document type and recreated it and added back the image cropper. Unfortunately the issue remains

    Tim

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Dec 27, 2014 @ 20:25
    Jeavon Leopold
    0

    How strange! Maybe try copying both the Umbraco and Umbraco_Client folders from a clean download to your project and make sure your browser cache is cleared .

  • Tim Brooks 27 posts 79 karma points
    Dec 29, 2014 @ 20:08
    Tim Brooks
    0

    I found the exact issue after looking through all changes to the umbraco directory. @Jeavon - I figured your suggestion of swapping out the entire folder would work, but I've made other code changes to the back end in over 10+ files. I took a quick a look and found the file \umbraco\Views\propertyeditors\imagecropper had been updated. I believe this update occurred as I installed an image cropper package before I had realized it was included in the core. When I uninstalled the package this file wasn't changed back. The change made added a slash in front of /imagesrc in few places throughout the file.

    src="/imagesrc" />

    update to

    src="imagesrc" />

    With the slash removed it works fine now! Jeavon - thank you for the help!

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Dec 30, 2014 @ 11:53
    Jeavon Leopold
    0

    Wow, great it's sorted. I'm pretty sure that it wasn't the Image Cropper package that did that, but I can't think what it might have been....

Please Sign in or register to post replies

Write your reply to:

Draft