Page MenuHomePhabricator

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

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:

Screen Shot 2020-07-01 at 3.01.22 PM.png (343×395 px, 36 KB)

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;
            }

Event Timeline

Re-checked in wmf.29 - the issue is still present.

Change 715832 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/core@master] changes: Declare placeholder on quickfilters as disabled

https://gerrit.wikimedia.org/r/715832

Change 715832 merged by jenkins-bot:

[mediawiki/core@master] changes: Declare placeholder on quickfilters as disabled

https://gerrit.wikimedia.org/r/715832

Umherirrender claimed this task.
Umherirrender triaged this task as Lowest priority.