Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
When upgrading from 8.0.2 to 8.1.4, the IPublishedContent .GetCropUrl returns nothing. I can't seem to find a change regarding this, am I missing something?
Does this work for you?
var test = expert.Url.GetCropUrl(); // returns URL of the IPublishedContent (this is the item which contains an image, so it's not correct
var test2 = expert.Value<IPublishedContent>("expertPicture"); // returns null, while I can see the property in the Properties list
var test3 = expert.GetCropUrl("expertPicture", "Expert Picture"); // returns an empty string
I would expect test2 to work correctly, but it is not. Is it because the value is of a different type, something media related?
var test = expert.Value<ImageCropperValue>("expertPicture");
var test2 = test.GetCropUrl("Expert Picture");
test is returning the correct value. test2 is returning a querystring (without url: "?anchor=center&mode=crop&width=500&height=500")
Edit 2: current workaround solution (if this is not intended):
var picture = expert.Value<ImageCropperValue>("expertPicture");
var url = picture.Url;
var cropUrl = url + picture.GetCropUrl("Expert Picture");
I'm using the same workaround as edit 2 but I find it strange that this is not default available.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted