Editable Fields 7.x-1.0-alpha2+5-dev
Panels 7.x-3.3
Drupal 7.15, 2012-08-01 (I know I need to update that)
I have a file field that is editable on a panel page. It works great except when I save it with only one file. In the event that the page is drawn with only one file uploaded to this field, the buttons disappear. Since a save triggers a redraw, if I save after uploading the first file then this field becomes effectively locked. By buttons I mean:
- the Remove button from inside the draggable table's row
- the Upload button outside the table but inside the fieldset, next to the Browse option
- the Save outside the fieldset
The Browse with the file field still works, but since Upload is missing I cannot attach the file I select.
The Upload button's code (when it shows) is:
input type="submit" class="form-submit ajax-processed" value="Upload" name="field_person_internal_attach_und_3_upload_button" id="edit-field-person-internal-attach-und-3-upload-button"
Firebug console does not see any javascript error when I use the Save button on this field with only one file. I can bring the buttons back by editing the node directly and adding another file or removing the only one. If I start with none, I can upload two or more before saving and get passed this issue. I cannot tell my client "just upload some useless file when you upload the first one because the site breaks otherwise".
If there is any more information I can provide, let me know. Thanks for the help.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | broken buttons.zip | 158.13 KB | developerweeks |
Comments
Comment #1
developerweeks commentedIf a visual helps, I have attached a video of the behavior.
Comment #2
developerweeks commentedAfter a chain of file-related bugs on the site, this is no longer an issue. I cant remember what fixed this particular one, sorry.
Comment #3
ktrev commentedWe are facing this same problem.Can any one help?
Comment #4
ankur1 commentedwe are also trying to solve the same problem.Can anyone help?
Comment #5
ktrev commentedComment #6
pinueve commentedsame problem with a commerce order in a mulivalue file field. please help.
Version 7.x-1.0-alpha3
Comment #7
behanner commentedI've now got this. Everything was working fine then was about to make a video showing off the site to the client and bam.
This is a real problem.
I'm not on Panels I'm on Display Suite.
Comment #8
behanner commentedOk so the problem is that the buttons are hidden. They are there but the display has been set to 'hidden' for some reason that I can't find.
I suspect the problem may be in another module but not much an idea which one.
Comment #9
behanner commentedTry commenting out all the bellow. its my current solution.
if ($this.find('input[type=text],input[type=checkbox],textarea,select').length == 1 || $this.find('input[type=radio] ').length > 1) {
$this.find('.form-submit').hide();
$this.find('input[type=text],input[type=checkbox],input[type=radio],textarea,select').change(function() {
$this.find('.form-submit').triggerHandler('click');
});
}
var submitName = '.form-submit.editablefield-edit-hover';
It theoretically needs to be rewritten to take account of more complex types.
Comment #10
pinueve commentedI did #9 and it works IF you have only one editable field in your view, if you have more than one, it will display one button for each editable field. I did not commented this line: var submitName = '.form-submit.editablefield-edit-hover';
Comment #11
denes.szabo commentedTry this patch https://www.drupal.org/project/editablefields/issues/1954456#comment-128... - It solved my no button problems.
Comment #12
joelpittetThis is how things work, it could be better and I've made some recent improvements in the dev branch.