Open gradel opened 1 month ago
I have somewhat similar problems. Needed to override admin_file.html and removed detail=True.
django==4.2.16 django-filer==3.2.3
@gradel How do I recreate this issue? I would like to give it a try
@mrbazzan Just use the current version of django-filer. Then in the admin interface add a image, save the model (page or whatever the ImageField is attached to). When now clicking the red "clear" X the image doesn't disappear.
@cobia yes, I replaced "detail" with the former '80x80' string.
@mrbazzan Just use the current version of django-filer. Then in the admin interface add a image, save the model (page or whatever the ImageField is attached to). When now clicking the red "clear" X the image doesn't disappear.
I have added an image, saved the model and can still remove the image. Am I doing something wrong?
I am unable to view this image.
@mrbazzan The issue is not about saving/removing the image from its model. Its just about the javascript driven behavior of the editing interface before saving. As soon as the remove button is clicked the thumbnail used to disappear immediately. And as soon as you chose another image a thumbnail of it used to be displayed immediately before any saving of the model.
Image is here too:
@mrbazzan The issue is not about saving/removing the image from its model. Its just about the javascript driven behavior of the editing interface before saving. As soon as the remove button is clicked the thumbnail used to disappear immediately. And as soon as you chose another image a thumbnail of it used to be displayed immediately before any saving of the model.
Now I understand the problem. Thanks. 👍🏿
Image is here too: Thanks for the image
Possible bug introduced here: https://github.com/django-cms/django-filer/commit/f919cbfce877c334ef7b33e329f2749f46fe5876#diff-b4f795d97b769d1875bca80a02e74dd46438e9ebd2a39a818d3999ad8fea0ca3L29 This leads to
detail
becoming True infile_icon
templatetag and then infile_icon_context
andget_aspect_ratio_and_download_url
, where thereforedownload_url
gets added to the context what in turn infile_icon.html
lets the img element get selected which is lacking thethumbnail_img
class. Thefiler_clear
function inaddons/widget.js
thus can not find the img:var thumbnail = container.find('.thumbnail_img');
.