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.

CommentFileSizeAuthor
#1 broken buttons.zip158.13 KBdeveloperweeks

Comments

developerweeks’s picture

StatusFileSize
new158.13 KB

If a visual helps, I have attached a video of the behavior.

developerweeks’s picture

Issue summary: View changes
Status: Active » Closed (cannot reproduce)

After a chain of file-related bugs on the site, this is no longer an issue. I cant remember what fixed this particular one, sorry.

ktrev’s picture

We are facing this same problem.Can any one help?

ankur1’s picture

we are also trying to solve the same problem.Can anyone help?

ktrev’s picture

Status: Closed (cannot reproduce) » Active
pinueve’s picture

same problem with a commerce order in a mulivalue file field. please help.
Version 7.x-1.0-alpha3

behanner’s picture

I'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.

behanner’s picture

Ok 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.

behanner’s picture

Try 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.

pinueve’s picture

I 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';

denes.szabo’s picture

Try this patch https://www.drupal.org/project/editablefields/issues/1954456#comment-128... - It solved my no button problems.

joelpittet’s picture

Version: 7.x-1.0-alpha2 » 7.x-1.x-dev

This is how things work, it could be better and I've made some recent improvements in the dev branch.