Opened 12 years ago

Closed 12 years ago

#2046 closed bug (Fixed)

Issue with prefs pages when enabling/disabling plugins in webui

Reported by: Cas Owned by: damoxc
Priority: minor Milestone: 1.3.6
Component: Web UI Version: 1.3.3
Keywords: Cc:


Noticed that pages are not adding or removing for some reason when enabling or disabling a plugin and can even sometimes end up with multiple pages. Refreshing browser solves the issue though.

Change History (4)

comment:1 Changed 12 years ago by Cas

  • Milestone changed from 1.3.x to 1.3.6

comment:2 Changed 12 years ago by Cas

The problem here is that the event manager stops not long after starting due to null events so any PluginEnabledEvents? are just not processed unless browser refreshed. Also noticed that the errorCount is never reset if there are successful events.

From testing so far this seems the likely solution:

  • deluge/ui/web/js/deluge-all/EventsManager.js

    a b Deluge.EventsManager = Ext.extend(Ext.util.Observable, { 
    9191       }, 
    9393       onGetEventsSuccess: function(events) { 
    94                if (!events) return; 
     94               this.errorCount = 0; 
     95               if (events){ 
    9596                       Ext.each(events, function(event) { 
    9697                               var name = event[0], args = event[1]; 
    9798                               args.splice(0, 0, name); 
    9899                               this.fireEvent.apply(this, args); 
    99100                       }, this); 
     101               } 
    100102               if (this.running) this.getEvents(); 
    101103       }, 

comment:3 Changed 12 years ago by gazpachoking

I have some more work on this in this branch. There are some errors after plugins (at least label) are disabled, unsure if it's related.

comment:4 Changed 12 years ago by gazpachoking

  • Resolution set to fixed
  • Status changed from new to closed

Fixed in 1.3-stable: 782b39c90db, e865180e832

Note: See TracTickets for help on using tickets.