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 you upload a image bigger than the file size limit,
You get a double error
Comment | File | Size | Author |
---|---|---|---|
#17 | Screen Shot 2015-10-10 at 12.05.47 pm.png | 105.7 KB | gauravjeet |
#16 | file-file_upload_gives_double_error-2349835-16.patch | 954 bytes | visabhishek |
#13 | file-file_upload_gives_double_error-2349835-13.patch | 898 bytes | Vj |
#11 | double error.png | 136.71 KB | nitishchopra |
#6 | file-file_upload_gives_double_error-2349835-6.patch | 1.03 KB | Vj |
Comments
Comment #1
oenie CreditAttribution: oenie commentedfixing the amsterdam sprint tag to amsterdam2014
Comment #2
swentel CreditAttribution: swentel commentedConfirmed - though this was related to #2358409: image_image field element is processed 2 times but it's not
Comment #3
Vj CreditAttribution: Vj commentedError shows twice because of the duplicate id generated template_preprocess_file_widget, template_preprocess_file_widget_multiple.
Added a patch to fix this issue.
Comment #4
jlcerrada CreditAttribution: jlcerrada commentedI've tested the patch provided by Vj in the comment #3 and it fixes the double error.
Comment #5
Wim LeersThere's commented code in this patch. Please fix that.
Comment #6
Vj CreditAttribution: Vj commentedRemoved commented lines. Let me know if any other changes need to be done.
Comment #7
Vj CreditAttribution: Vj commentedComment #8
Wim LeersI doubt this is the correct solution. Or at least, this'd be one of the weirdest bugfixes I've ever seen :)
Can you explain why this solves the problem, and why you think this is the correct solution?
Comment #9
Vj CreditAttribution: Vj commentedFile field has id (edit-field-image-ajax-wrapper) twice. This is the reason its showing double errors. So removed id by unset prefix and suffix.
I am first time trying to use drupal 8 so just wanted to contribute to fix issue :)
Comment #10
Vj CreditAttribution: Vj commented@Wim can you please guide me to correct solution ???
Comment #11
nitishchopra CreditAttribution: nitishchopra commentedPatch applied successfully, But the double error still exists when we try to upload wrong file format image.please find attached screen shot.
Comment #12
Wim LeersThis almost sounds like the AJAX system is subtly broken?
Comment #13
Vj CreditAttribution: Vj commentedAfter bit debugging found \drupal\core\lib\Drupal\Core\Render\Renderer.php::doRender function called twice.
Added a if condition for render_children and issue fixed.
Comment #14
mondrakeThis looks like a duplicate of #2346893: Duplicate AJAX wrapper around a file field
Comment #15
Mile23Needs reroll, and is this really a duplicate?
Comment #16
visabhishek CreditAttribution: visabhishek at Azri Solutions commentedpatch Re-rolled.
Comment #17
gauravjeet CreditAttribution: gauravjeet as a volunteer and at Srijan | A Material+ Company commentedLooks like this issue is fixed elsewhere in the code, without applying the given patch I tested it with a latest code pull. I do not see double errors. screenshot attached. Removed Needs Reroll Tag
Comment #18
gauravjeet CreditAttribution: gauravjeet as a volunteer and at Srijan | A Material+ Company commented+RTBC
Comment #21
visabhishek CreditAttribution: visabhishek at Azri Solutions commentedDont know why tests failed..
Comment #22
amateescu CreditAttribution: amateescu for Pfizer, Inc. commentedTested the patch from #2346893-98: Duplicate AJAX wrapper around a file field and it fixes the problem reported here, so marking this one as a duplicate.