Opened 13 years ago

Closed 12 years ago

#2046 closed bug (Fixed)

Issue with prefs pages when enabling/disabling plugins in webui

Reported by: Calum Owned by: Damien Churchill
Priority: minor Milestone: 1.3.6
Component: Web UI Version: 1.3.3
Keywords: Cc:

Description

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 by Calum, 13 years ago

Milestone: 1.3.x1.3.6

comment:2 by Calum, 12 years ago

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       },
    9292
    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 by Chase, 12 years ago

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 by Chase, 12 years ago

Resolution: fixed
Status: newclosed

Fixed in 1.3-stable: 782b39c90db, e865180e832

Note: See TracTickets for help on using tickets.