Opened 10 months ago
Last modified 10 months ago
#3612 new bug
'Install-plugin' broken in web-UI
Reported by: | mhertz | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | needs verified |
Component: | Web UI | Version: | develop |
Keywords: | Cc: |
Description
This happens because the plugin filename gets parsed wrongly from the form-panel's 'fileuploadfield', before main RPC API call ran, so the plugin gets installed under wrong name i.e. '[object FileList]' and hence useless(as no 'egg' extension).
I changed the field's 'changed' hook like this to fix:
Line 127 of 'deluge/ui/web/js/extjs/ext-extensions/form/FileUploadField.js':
From/to:
this.setValue(value);
this.setValue(value[0]['name']);
Before found that way, I instead did the following, which fixes issue, but in contrary to above still need e.g. added handler to fix minor cosmetic issue of showing wrong filename in textfield after selecting(i.e. '[object FileList]'):
Line 72 of 'deluge/ui/web/js/deluge-all/preferences/InstallPluginWindow.js':
From/to:
var filename = this.form.getForm().getFieldValues().file;
var filename = this.form.getForm().findField('file').value[0]['name'];
Thanks in advance!
Sorry cannot edit above, and just wanted add first code-suggestion breaks file-upload of torrents, sorry, and so second suggestion works atleast. Sorry again.
Edit: Obviously you guys don't need my help lol, but this is final fix I settled on personally, fixing also minor cosmetic issue:
Add following new section after line 50 in 'deluge/ui/web/js/deluge-all/preferences/InstallPluginWindow.js':