Opened 8 months ago

Last modified 8 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:


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':



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':


var filename = this.form.getForm().getFieldValues().file;
var filename = this.form.getForm().findField('file').value[0]['name'];

Thanks in advance!

Change History (1)

comment:1 Changed 8 months ago by mhertz

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':

					listeners: {
						fileselected: function(fb,v){

Last edited 8 months ago by mhertz (previous) (diff)
Note: See TracTickets for help on using tickets.