Page MenuHomePhabricator

Namespace filter missing for advanced search on beta.wmflabs
Closed, ResolvedPublic

Description

  1. Go to https://de.wikipedia.beta.wmflabs.org/wiki/Spezial:Einstellungen#mw-prefsection-betafeatures, enable advanced search.
  2. Go to https://de.wikipedia.beta.wmflabs.org/w/index.php?search=&title=Spezial%3ASuche&go=Artikel

Expected: Namespace filter is shown.
Actual: Namespace filter is missing, error console shows an error "Too much recursion", with a stack trace that looks line an infinite loop of

OO.ui.mixin.GroupElement.prototype.addItems
OO.ui.TagMultiselectWidget.prototype.onTagDisabled
oo.EventEmitter.prototype.emit
oo.EventEmitter.prototype.emit
OO.ui.TagItemWidget.prototype.setDisabled
mw.libs.advancedSearch.ui.NamespaceFilters.prototype.onChangeTags
oo.EventEmitter.prototype.emit

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Might be caused by rGOJUaca140acaf80: TagMultiselectWidget: Handle disabled items, which could infer with the code that disables the namespace tags if there is only one left.

Thanks for looking into it Schnark! FYI, for AdvancedSearch, we are getting rid of the disabled tags as of T189130: Allow an empty namespace bar, but that doesn't stop this from being a bug anyways... @Volker_E @Mooeypoo @matmarex in case this has something to do with your current rollout

In a user script, where the same issue occurred, I fixed it by simply replacing onTagDisabled with a dummy: https://de.wikipedia.org/w/index.php?title=Benutzer:Schnark/js/fliegelflagel.js/manage.js&diff=prev&oldid=175336216

I think this magically resolved itself with the changes we did for T189130. @Schnark, can you please check if the error is gone now?

Lea_WMDE claimed this task.

I'm setting this as resolved since we did not hear anything after the last changes. If this issue still persists, please reopen.