-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GetCropUrl returns null with valid cropAlias param V8 #5737
Comments
Yes, unfortunately this will be true for any updates you will do for datatypes. We do not update existing data when a datatype updates simply because it is an expensive operation that could take a very long time and much processing power. It's up to you to do some defensive querying for this or possibly provide a migration tool for when you know things will need to change. Just be aware that you'll need to be careful with that migration script in case you have a large number of nodes (see previous paragraph). |
Hmm, I just saw your related PR, and it's not what I thought you wanted to get solved. ;-) I'll have a look at it soon, this might be an okay solution, not sure yet. |
I did something terribly wrong to that branch. I'll submit a new PR shortly. |
@cleversolutions I can't reproduce this issue on the latest codebase. Could I ask you to try this out again on the latest codebase? |
Thanks @kjac I’ll retest and confirm tomorrow. |
Hi @kjac I reproduced it this morning from a fresh clone of v8/dev. Then on line 35 of Products.cshtml changed the line to use the crop
No images render. I save the jacket image then it renders while the others don't. |
Hi again @cleversolutions This is mysterious! For the life of me I can't reproduce the issue 😞 I have tried both with an imagecropper property directly on the content item and using an imagecropper on a picked media item. To no avail. Here's how I have tested the first scenario (I'm guessing this is much along the lines of what you're experiencing):
<ul>
<li>Crop 1: @Model.Media.GetCropUrl("Crop 1")</li>
<li>Crop 2: @Model.Media.GetCropUrl("Crop 2")</li>
<li>Crop 3: @Model.Media.GetCropUrl("Crop 3")</li>
</ul>
Here's a GIF of the whole thing: |
Perhaps the difference is your document type uses an image cropper directly where as starter kit uses a media picker. I’ll test this idea further tomorrow. |
@cleversolutions I tried the same thing with a media picker... same result. |
did any one fixed this issue ? |
@uppercuut We can't seem to reproduce the issue, so if you have more info on how to make it fail then we might have a chance to fix it. |
Im using Umrbaco8 Image Cropper
|
We are launching a new Umbraco 8 site on Monday. Once it is live I’ll have a bit more time to spend testing this further. I’ll post a gif of reproduction maybe mid week. |
@kjac Perhaps the difference is that you are going from 2 to 3 crops, where @cleversolutions is going from 0 to 1 crops? |
I had this issue as @cleversolutions describes on an Umbraco 8.1.5 installation, but after upgrading to 8.5.3 it looks like it has been solved |
I’ll record a screen capture after I get back from vacation. I was able to still reproduce the problem on a fresh 8.6 rc install. |
Here is a screen video of the problem using 8.6 RC-0. I fire up a new starter site, show the default products page working. I add a crop called "test" to the image cropper, update the products template to use the crop, show that the page doesn't render with the new cropper, then save the biker jacket image and reload the products page to show that the biker jacket image shows while the others do not. The expectation, if everything is working properly, is that all images should show without having to resave the images after adding the new crop alias to the image cropper. |
@rbottema good catch. I continued my test above adding a second crop, and it works as expected. It seems this problem only happens when going from 0 to 1 or more crops. |
Hi @cleversolutions, Have you tested this on 8.6.1? |
I'm working with Umbraco 8.6.3 and got the same issue: GetCropUrl() returned the below value without Image Url |
Bug summary
ImageCropperTemplateExtensions.GetCropUrl returns null when provided a valid cropAlias parameter unless you save each image in your media library after adding a new crop.
Specifics
This occurs in 8.0.2 and v8/dev using Chrome (but should affect all browsers)
Steps to reproduce
<img src='@product.Photos.GetCropUrl("square")' />
Expected result
The images should be rendered. See reproduction for more details.
Actual result
The images are not. See reproduction for more details.
The text was updated successfully, but these errors were encountered: