Skip to content
This repository has been archived by the owner on Mar 7, 2019. It is now read-only.

Image Cropper no longer works since Umbraco 7.5.8 #384

Closed
DanDiplo opened this issue Jan 30, 2017 · 14 comments
Closed

Image Cropper no longer works since Umbraco 7.5.8 #384

DanDiplo opened this issue Jan 30, 2017 · 14 comments
Labels

Comments

@DanDiplo
Copy link

DanDiplo commented Jan 30, 2017

I've noticed on two sites that were upgraded to Umbraco 7.5.8 that used Archetype (1.13.1) with an Image Cropper that the Image Cropper no longer retains newly uploaded images. I've also confirmed this with a clean install of Umbraco 7.5.8 using latest Archetype (both installed via NuGet).

Basic steps are:

  1. Created an Archetype data type with an Image Cropper property (called, say, "image")
  2. Add your Archetype to a document type

When you edit a page using your document type the field "image" will display the Image Cropper properly and lets you appear to upload an image. However, when you save and publish the image is not stored - nothing appears to get added to the media folder. After saving the image will have gone and won't be saved in the Media folder.

Archetype does seem to save the image data in the JSON data, but the image src is empty. Here's an example of the JSON saved (using developer mode in Archetype):


{  
   "fieldsets":[  
      {  
         "properties":[  
            {  
               "alias":"heading",
               "value":"Heading",
               "propertyEditorAlias":"Umbraco.Textbox",
               "dataTypeId":-88,
               "dataTypeGuid":"0cc0eba1-9960-42c9-bf9b-60e150b429ae",
               "editorState":null,
               "hostContentType":null
            },
            {  
               "alias":"image",
               "value":{  
                  "focalPoint":{  
                     "left":0.5,
                     "top":0.5
                  },
                  "src":"",
                  "crops":null
               },
               "propertyEditorAlias":"Umbraco.ImageCropper",
               "dataTypeId":1043,
               "dataTypeGuid":"1df9f033-e6d4-451f-b8d2-e0cbc50a836f",
               "editorState":null,
               "hostContentType":null
            }
         ],
         "alias":"archetype",
         "disabled":false,
         "id":"b8106add-9115-4f9a-812d-36c8551e4388",
         "releaseDate":null,
         "expireDate":null,
         "allowedMemberGroups":"",
         "collapse":true,
         "isValid":true,
         "releaseDateModel":{  
            "alias":"archetypeReleaseDate_1",
            "view":"datepicker",
            "value":null
         },
         "expireDateModel":{  
            "alias":"archetypeExpireDate_2",
            "view":"datepicker",
            "value":null
         },
         "allowedMemberGroupsModel":{  
            "alias":"archetypeAllowedMemberGroups_3",
            "view":"membergrouppicker",
            "value":""
         }
      }
   ]
}

This did work before 7.5.8 - so something appears to have changed in this version of Umbraco. However, an Image Cropper on it's own (ie. not within Archetype) still works as before.

Update: I "downgraded" Umbraco to 7.5.7 and the issue persisted. However, downgrading to 7.5.6 did fix it in my test install.

@kjac
Copy link
Contributor

kjac commented Feb 15, 2017

@DanDiplo How annoying! I'm on it 😄

@DanDiplo
Copy link
Author

@kjac Thanks, really appreciate it! I'd look myself, but this project is far too advanced for my basic Angular skills.

@kjac kjac added the bug label Feb 15, 2017
@kjac kjac closed this as completed in e9b478c Feb 16, 2017
@JohnBertelsen
Copy link

We are also having this problem, with exact same install versions. Do you have any idea when this will be released on NuGet? or is there a Beta version, we would be happy to help testing.

@DanDiplo
Copy link
Author

@kjac I downloaded the source (master branch) and built it using grunt, and applied the fixed files to an Umbraco 7.5.10 site (yeah, bleeding edge!) but I still see the issue. I've updated both the JS files in App_Plugins and the DLL. The same issue occurs - when I save an archetype fieldset with an ImageCropper property the src still remains empty after publishing. Is there anything I've missing?

@kjac
Copy link
Contributor

kjac commented Feb 22, 2017 via email

@DanDiplo
Copy link
Author

@kjac My bad. I forgot the project I was using had multiple references to the Archetype package, so even though I replaced the DLL in /bin, one of the class libraries was still referencing the NuGet package, so it was copying that DLL over into the /bin. Now I've fixed that I can confirm it does work, so thank you - and sorry for the false alarm!

But I guess I'd reiterate what @JohnBertelsen says - is there any chance of a new NuGet package soon? I'm happy to test any pre-release if that would help. Thanks!

@kgiszewski
Copy link
Owner

@kjac Do we know if this is backwards compatible?

Or do we need to bump the dependency of the core to 7.5.8?

@kjac
Copy link
Contributor

kjac commented Feb 22, 2017

@kgiszewski it's fully backwards compatible 👍

@kgiszewski
Copy link
Owner

ok ty :)

https://www.nuget.org/packages/Archetype/1.13.2

@DanDiplo @JohnBertelsen ==^ Give this a shot

@kjac you deserve a medal ;)

@JohnBertelsen
Copy link

@kgiszewski Will do, thank you very much. And thanks to @kjac for the effort #H5YR

@kgiszewski
Copy link
Owner

Please report any issues here. I'll assume all is well and make an announcement later today.

@DanDiplo
Copy link
Author

@kgiszewski @kjac Thanks EVER so much guys - really appreciate the time and effort you've put in.

I've tested the 1.13.2 package (with latest Umbraco 7.5.10) and it definitely fixes the Image Cropper issue. Not seen any other issues. So I think this is good to go!

@kgiszewski
Copy link
Owner

@DanDiplo thanks for the feedback!

@JohnBertelsen
Copy link

Tested this on a local site and then a live site. Both File upload and Image cropper working as expected. Nice work.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants