Hey, first of all, thanks for this module, which fills a fundamental gap. Unfortunately, I can't get it to run correctly.
After I have saved a new crop on an image, the itok token of the path does not change. As a result, the image is of course not reloaded after the crop has been changed. (The browser cache does not load it because the URL/itok does not change)
The token is created in /src/MediaContextualCropService.php : 203 and is based on the original image style. So as long as the non-contextual derivative has not been changed, this token will always remain the same.
Have I configured something wrong or can someone else confirm this?
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | media_contextual_crop-3536269-1.patch | 836 bytes | hauke-vq |
Comments
Comment #2
hauke-vqOh no. I've just realised that I got that wrong. Without Contextual Crop, I have an additional query parameter that updates when a crop is made. This does not exist on contextual cropped images.
I'm not very experienced with backend programming, so this is a bit difficult for me to figure out.
Comment #3
drdam commentedThat's a main issue
Can you be more precise with the site configuration (modules involved, configuration on image styles....), URL generated, some screen-shots...
Thanks
Comment #4
hauke-vqI have written a patch that solves my problem. But I am not completely sure if it is the correct approach.
I'll try to summarise the problem again:
For non-context-based crops, the URLs to the image styles have an additional query paramter ‘h’. This updates itself based on the crop and serves as a cache breaker for browsers/CDNs because the actual URL does not change.
Comment #5
drdam commentedOk, it have been solved in an older version (with another controller), and I forgot to reapply it...
thanks
Comment #7
drdam commentedfixed in 2.1.8
Comment #8
drdam commented