BoldMinded acquires Ansel, support ending for all add-ons. BoldMinded acquires Ansel, support ending for all add-ons. Read More →
Support has been discontinued. Issues remain available as an archive. Support has been discontinued. Issues remain available as an archive.
Crop Ratio isn't being honored
#155 opened by Imp Designs
Description
Ansel fields don't observe/honor the crop ratio setting. Regardless of what I set the ratio to, the crop tool is set to full image dimensions.
Replies
- Imp Designs
Replied 5/24/2019 3:06 PM, Edited 5/30/2019 1:18 PM
I have Ansel installed on two other sites on the same server running the same version of PHP, etc and it works fine on them. The difference is:
1) The other sites are on EE 5.1.2 and EE 4.3.6 respectively.
- TJ Draper
Replied 5/28/2019 9:28 AM, Edited 5/30/2019 1:18 PM
Hi,
Can you provide your field settings for the field that's not working?
Also, can you open up the Chrome developer console while loading the page with the Ansel field and try to crop the image and tell me if there are any javascript errors on the console?
- Imp Designs
Replied 5/28/2019 10:42 AM, Edited 5/30/2019 1:18 PM
Field Settings:
Upload Directory- Page Images
Save Directory - Optimized
Min Quantity - 1
Max Quantity - 1
Prevent File uploads - on
Image Quality - 90
Force JPEG - on
Retina Mode - on
Min Width, Min Height, Max Width, Max Height - unset
Crop Ratio 1:1
Display Title Field: on
Require Title Field: on
Customize Title Label: Enter a brief description of this image here. It will be used as the image's 'alt' tag.
Nothing else enabled.I didn't see any Chrome developer console javascript errors when loading page and trying to crop.
I also have CE Image installed on this site (some fields are going to get auto cropped/resized vs allowing manual with Ansel), but disabling CE Image has no effect on the issue.
- Imp Designs
Replied 5/29/2019 9:59 AM, Edited 5/30/2019 1:18 PM
More info:
This definitely seems to be related to EE 5.2.2 and above. I just ran an update on an EE 5.x site and it's Ansel install stopped honoring the crop ratio after updating.
- TJ Draper
Replied 5/29/2019 10:14 PM, Edited 5/30/2019 1:18 PM
I have not been able to replicate this issue. Just so you know I'm not blowing smoke, here's a video of it working in the latest version of EE :) https://vimeo.com/339259448/194c7f448f
- Imp Designs
Replied 5/30/2019 7:42 AM, Edited 5/30/2019 1:18 PM
Cool enough... what should I be looking for to resolve my issue with, at this point, 3 websites? Is there some debugging process you can recommend that might help identify what's wrong with my environment or whatever?
Any assistance would be greatly appreciated!
- TJ Draper
Replied 5/30/2019 9:30 AM, Edited 5/30/2019 1:18 PM
Honestly I'm not sure what on earth could be causing this. Do you happen to have one of these in a staging or dev environment I could get access to?
- Imp Designs
Replied 5/30/2019 9:59 AM, Edited 5/30/2019 1:18 PM
Heck yeah I do! I'm juggling cats right now but will send access info via the private doo-hickey in a few minutes.
- Imp Designs
Replied 5/30/2019 12:38 PM, Edited 5/30/2019 1:18 PM
I noticed your previous reply was posted at 10:30pm and thought "TJ is just a dev working on stuff like me, and I'm causing him late night headaches."
I decided to make one more pass at finding the cause of the issue before hoisting it on you and found the issue... buckle up—it's a weird one!
In the Ansel Global Settings I had entered the following text in the Default customize title label:
Enter a brief description of this image here. It will be used as the image's 'alt' tag.
Upon reviewing other sites I had that DID work, I realized none of the working sites had single quotes in that field. Rewording the text to remove the single quotes resolved the problem. I was experiencing the issue on other sites I'd recently upgraded because in the upgrade I'd also added Ansel and had copied the single quote text info from the first site that displayed the problem.
So I'm good now!
- TJ Draper
Replied 5/30/2019 1:18 PM
That's a weird one and the single quotes definitely "shouldn't" do that. I'm glad your issue is resolved but I'll look into what's causing single quotes to do that.