Closed (outdated)
Project:
Drupal core
Version:
7.x-dev
Component:
field system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
16 Oct 2015 at 11:30 UTC
Updated:
22 Jan 2016 at 17:57 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
lhuria94 commentedHi Ambidex,
I did just tried to reproduce the issue with D 7.40 standard profile.
Added a image field in Basic page content type.
Then tried to save without filling the mandatory title and without uploading the image, just selected the image from local machine.
Image gets uploaded as you can see in the screenshot. Yes now i can see the issue. Input field just disappeared.
Looks like a file field issue. I was not able to reproduce it first. Thats why i wrote this comment.
After commenting, I was able to reproduce. Will get back to you after taking a look at the issue.
Comment #3
priya.chat commentedHello Ambidex,
I have go through all the steps that you have written and able to reproduce the issue with Drupal 7.40 with the "standard"-installation profile .
As I notice your problem is that the image input form field will disappear on error page when node form is submitted with Save button.
I have added a patch to solve this issue. Please review the patch.
Comment #4
dcam commentedTagging this issue properly so it will get noticed by the JS maintainers.
Comment #5
dcam commentedAlso, @priya.chat when you upload a patch if you set the issue status to Needs review then it will trigger Testbot to automatically test it.
Comment #7
droplet commentedComment #8
rpayanmIn drupal 8 don't exist this issue.
Comment #10
vijeta14 commentedHi @priya.chat
As i can see you patch work, but this patch causes the file to remove on submit. File should be uploaded and there should be option to upload another ideally.
Thoughts?
Comment #11
swarad07The patch in #3 applied cleanly for me on 7.x-dev.
However, the patches does not fix the issue for me. Attaching the screenshot after applying patch.
It would be great if someone can review the above code and confirm if it is right place to fix the issue.
Comment #12
swarad07Comment #13
natanmoraesI'm having the same problem with the File field with unlimited values on Drupal 7.41.
The patch in #3 does solve the problem with the missing input but the selected file doesn't get uploaded.
Comment #14
natanmoraesI couldn't find where is the problem that causes this issue neither a way to resolve it but, from my debugging, it seems that the file widget is not being rendered properly when the form goes through the validation process because the functions that would build it (file_field_widget_form for instance) are not called at that moment and Drupal doesn't seem to know there's an extra element (the field input) that needs to be rendered.
Since this is an issue with the file upload in general, and the fix doesn't seem to be on javascript, I'm removing the js and novice related tags