Updated to crop 8.1.2 and the image on IE 11 wont load. But this just happens when the image styles have been generated for the first time on the disk. After that, it works fine. Later I tried it also with 8.1.1 and the result is just the same. Only downgrading to version 8.1.0 the issue won't appear.
For reproducing the issue, you just need to flush the image style and then load the site on IE 11 (load the site on a private Mode, to avoid browser caching). It happens mainly with big header images and only on IE11. On Chrome it works great.
Tested the issue also with the patch on https://www.drupal.org/node/2868638, but no success.
Comment | File | Size | Author |
---|---|---|---|
#8 | Capture d’écran 2018-07-04 à 18.00.22.png | 529.86 KB | woprrr |
Comments
Comment #2
lulbina CreditAttribution: lulbina at Namics commentedComment #3
woprrr CreditAttribution: woprrr as a volunteer and at NeoLynk commentedSadly I can’t reproduce this bug actually because I’m on Mac OS system but during fixes and optimisations of file_uri génération yesterday this problème can be solve. Please can you retest it and make me a feed-back ? (Close issue of all work well ;))
Comment #4
woprrr CreditAttribution: woprrr as a volunteer and at NeoLynk commentedHi @lulbina,
The problem persist with last version of drupal and crop api ? That kind of error can be due to an image with transparency it's you case ?
Comment #5
fdverwoerd CreditAttribution: fdverwoerd at Dutch Open Projects commentedI had a similar problem and its because '&' becomes escaped to '&';. I am still not sure whats causing this... If it's crop, or hook_file_url_alter or even something else.
See example url:
localhost/sites/default/files/styles/social_media/public/2018-02/04113_london_2560x1440.jpg?h=478ed3c2&itok=7xKWG8UK
In crop_file_url_alter() there is something like this
But the uri inside crop_file_url_alter never has query parameters as far as I tested. So It's always ?h the first one. Then the Itok parameter gets appended and escaped somewhere?
Modules used: Crop API, Image Widget Crop
Comment #6
DarkstarTom CreditAttribution: DarkstarTom commentedI am on MacOS and Chrome and I am also having this problem. Using crop 8.x-1.2 with Image Widget Crop 8.x-2.1 works fine but when I upgrade crop to either 8.x-2.0-rc1 or 8.x-1.5 I see the problem.
@fdverwoerd is correct as the problem is caused by the '&' being incorrectly formatted.
Comment #7
woprrr CreditAttribution: woprrr as a volunteer and at NeoLynk commentedI will see this fast !
Comment #8
woprrr CreditAttribution: woprrr as a volunteer and at NeoLynk commentedAfter some tests with 2.x and iwc and last version of drupal 8.5 it's impossible to reproduce your problems.
I evry cases uri_alter and all drupal internal uri are automatically encoded by core the problem does be another module / dev add this & explicitly ? If I add this & directly in $uri to reproduce your problem the url show me the & but not break the image.
Can you describe more your current drupal stack ? or export your configuration ?
Comment #9
erichomanchuk CreditAttribution: erichomanchuk at Foster Interactive Inc. commentedI'm having a similar issue related to the meta tag module.
Using Crop 8.x-2.0-rc1 and ImageWidgetCrop 8.x-2.2
I'm using tokens to print the media image url to the og:image tag. When using an image style that uses crop it outputs the url like this. The ampersand is escaped breaking the image.
sites/default/files/styles/social_image/public/assets/images/animal-animal-photography-cat-104827.jpg?h=d51975f4&itok=I69sAKnS
Here was the same issue on imageWidgetCrop
https://www.drupal.org/project/image_widget_crop/issues/2932274