-
Notifications
You must be signed in to change notification settings - Fork 578
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
Adding a new crop to existing role causes issues #1193
Comments
Hi @IllyaMoskvin, I can confirm this issue but it's a bit different on my end (Twill 2.5.2) Following your steps, I do not get the error in the console. The medias field and the cropper display correctly, but I don't see my new crop in the cropper options, only the first crop that was available when the image was saved. Thanks for reporting! |
Thanks @pboivin! As a temporary work-around, we are "deleting" the selected media from the field, and re-selecting it from the media library. This allows us to then select the new crop. |
Hi guys, The inability of Twill to pick up changes to the crops configuration, forcing users to remove the associated image to allow a new set of crops, is a known issue that we should prioritize. It can be a critical issue if a crop position has been manually tailored by an editor. I am intrigued by the difference of behaviors. What @pboivin experiences is what I'm used to, not the error in console. We'll investigate. Thanks for reporting @IllyaMoskvin! |
I am also seeing the error in the console, and can confirm that this is related to changing the list of I can also confirm that if you delete the image with saved crops, and reupload the same image, the cropping feature will work again as spec'd. It would appear, then, that crop information is likely stored to the database in a rigid manner, wherein if the set of mediaParams changes later, things break. Agree with this being a high priority fix needed. |
thanks @pboivin! |
Description
I'm attempting to add a new crop to an existing image role.
https://twill.io/docs/#models
This is causing an error on the frontend in the CMS.
When I try to edit an existing media and select the new crop in the crop modal, I get an undefined error here:
twill/frontend/js/components/Cropper.vue
Line 157 in 377e5e0
Steps to reproduce
This is happening because
this.crop
resolves toundefined
.Expected result
Adding a new crop to an existing role does not cause an error.
Actual result
As described above.
Versions
Twill: 2.4.0
Laravel: 6.20.34
PHP: 7.2
DB: Postgres 13
The text was updated successfully, but these errors were encountered: