Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When an image field is added to a product type, the user needs to manually click "upload" before clicking "save variation". Otherwise the image that was chosen is not saved.
It would would be more user friendly for the image to be saved when the user clicks "save variation".
Comment | File | Size | Author |
---|---|---|---|
#6 | upload_files_without_using_upload_button-1621702-6.patch | 1.06 KB | vasike |
Comments
Comment #0.0
philipbe CreditAttribution: philipbe commentedadded image
Comment #1
bojanz CreditAttribution: bojanz commentedCommitted a fix.
Comment #2
philipbe CreditAttribution: philipbe commentedAwesome. Thanks!
Comment #4
rapira101 CreditAttribution: rapira101 commentedI had the same problem in the last branch of the module
Comment #5
NikaDevs CreditAttribution: NikaDevs commentedI've also found this bug in 7.x-1.1 - image will not uploaded if user simply selected image without clicking 'Upload' button.
Comment #6
vasikei can confirm this issue: no files uploaded without using 'Upload' button.
it seems that this issue happens because the file.js script from Drupal core file module doesn't get called.
here is a patch that adds this js file.
p.s. imho the solution should be an auto upload script, as without using 'Upload' button, there's no possibility to add/upload other files (multiple values) for referenced entity.
imagine 10 references with 10 files to upload each.
or maybe a compatibility (check) with an multiupload widget.
for example, here is an Commerce kickstart issue about this : #1714932-5: Improve usability of uploading files in attribute form.
Comment #7
vasikeit seems critical for Required File/Images fields.
Without using the Upload button, the referenced entity couldn't be saved and the file form element gets empty (Browse... again and again).
Comment #8
Sinan Erdem CreditAttribution: Sinan Erdem commentedI ended up using AutoUpload module (https://drupal.org/project/autoupload) and I recommend it.
Comment #9
bojanz CreditAttribution: bojanz commentedCommitted, thanks.
Comment #10.0
(not verified) CreditAttribution: commentedadded img link
Comment #11
nils.destoop CreditAttribution: nils.destoop commentedI'm still having this issue. I tested 7.x-1.3 and dev. But both have the problem.
Uploads are only saved when clicking the upload button.
Comment #12
FiNeX CreditAttribution: FiNeX commentedThe same problem is reproducible using 7.x-1.5 version (tested with image and file fields)
Comment #13
FiNeX CreditAttribution: FiNeX commentedAfter some test I've found a way to reproduce the bug. At first you've to enable jquery_update and set two different jquery versions as default and administrative pages. This will trigger the bug. After setting the same version on jquery update I've solved the problem.
Comment #14
DamienMcKenna@FiNeX: Are you saying the problem is being caused by a jQuery conflict due to using jQuery_Update?
@zuuperman: Are you using jquery_update too?
Comment #15
FiNeX CreditAttribution: FiNeX commented@Damien: it looks so
Comment #16
artaphis CreditAttribution: artaphis commentedThe problem is in old version of jquery.form.js. It works with 3.50, but doesn't with 2.69 (see https://www.drupal.org/node/2266303).
Comment #17
AaronBaumanSo, does anyone have a fix?
I need jquery_update for many reasons.
Is there a particular version i should be using for admin?
Comment #18
joelpittetI've been using jquery 1.7 fairly successfully for some time now.
Comment #19
AaronBauman@joelpittet thanks, i'll give that a shot.
I've had serious issues with Views UI + jquery 1.7 in the past, so I may have to figure out how to manually override jquery_update on specific pages.
Comment #20
bojanz CreditAttribution: bojanz commentedOkay, so there's no work left on this side. Thanks for letting us know.