Page MenuHomePhabricator

Recent Changes/Watchlist - click on empty 'Saved filters" give "item.getID is not a function"
Open, Needs TriagePublic

Description

Found in betalabs and in the current production - wmf.39.

  1. As a logged in user go to Special:RecentChanges or Special:Wtchlist
  2. There should not be any saved filters - click to open "Saved filters".
  3. Click anywhere in the text area " No filters saved yet [...}" - mw-rcfilters-ui-savedLinksListWidget-placeholder-description element:

The Console will display the following error:

Uncaught TypeError: item.getID is not a function
    at MwRcfiltersUiSavedLinksListWidget.SavedLinksListWidget.onMenuChoose
    at OoUiMenuSelectWidget.OO.EventEmitter.emit
    at OoUiMenuSelectWidget.OO.ui.SelectWidget.chooseItem 
    at OoUiMenuSelectWidget.OO.ui.MenuSelectWidget.chooseItem 
    at OoUiMenuSelectWidget.OO.ui.SelectWidget.onDocumentMouseUp

It seems to be complaining about

bindings = this.bindings[event].slice();
                args = slice.call(arguments, 1);
                for (i = 0; i < bindings.length; i++) {
                    binding = bindings[i];
                    if (typeof binding.method === 'string') {
                        method = binding.context[binding.method];
                    } else {
                        method = binding.method;
                    }
                    if (binding.once) {
                        this.off(event, method);
                    }
                    try {
                        method.apply(binding.context, binding.args ? binding.args.concat(args) : args);
                    } catch (e) {
                        setTimeout((function(error) {
                            throw error;
                        }
                        ).bind(null, e));
                    }
                }
                return true;
            }