Page MenuHomePhabricator

Unselecting an item in a SelectWidget throws TypeError
Closed, ResolvedPublicBUG REPORT

Description

Introduced with the latest OOUI Update. Can be reproduced in Advanced-Search on the beta cluster.

  • Go to the search page with the AdvancedSearch interface
  • Open the namespace selection by expanding Search in
  • Open the list of available namespaces by clicking in Add namespaces..
  • Unselect (Article) by clicking on it

Introduced in https://gerrit.wikimedia.org/r/c/oojs/ui/+/923297 and with the update to OOUI v0.47.3

Uncaught TypeError: state is undefined

setSelected OptionWidget.js:175
unselectItem SelectWidget.js:826

Related Objects

StatusSubtypeAssignedTask
ResolvedReleasedduvall
ResolvedBUG REPORTthiemowmde

Event Timeline

Change 936253 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[oojs/ui@master] Fix TypeError in OptionWidget

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

thiemowmde triaged this task as High priority.
thiemowmde moved this task from Backlog to Doing on the OOUI board.
thiemowmde changed the subtype of this task from "Task" to "Bug Report".
thiemowmde added subscribers: matmarex, thiemowmde.

Change 936253 merged by jenkins-bot:

[oojs/ui@master] Fix TypeError in OptionWidget

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

Change 936696 had a related patch set uploaded (by Bartosz Dziewoński; author: Anne Tomasevich):

[mediawiki/core@master] Revert "Update OOUI to v0.47.3"

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

We need to figure out how to fix the OOUI version in MediaWiki. There are three options:

@matmarex I'll attempt a new OOUI release now - Volker and Roan are both out, and I've never done one before, but Roan did just update the releasing instructions so let's hope for the best :) I'll post an update here soon...

I support the idea of hot-patching the copy in core. It can really be a single line of code. This one here: https://gerrit.wikimedia.org/r/c/oojs/ui/+/936253/1/src/widgets/SelectWidget.js#826. Unfortunately I'm currently unable to assist this.

Thanks @thiemowmde—I've reviewed the release process and it isn't too difficult, so I will go ahead and submit the patches, but if it ends up not being possible in the time we have we can just backport as a back-up option.

Change 936764 had a related patch set uploaded (by Anne Tomasevich; author: Anne Tomasevich):

[mediawiki/core@master] Update OOUI to v0.47.4

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

Change 936764 merged by jenkins-bot:

[mediawiki/core@master] Update OOUI to v0.47.4

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

Change 936696 abandoned by Jforrester:

[mediawiki/core@master] Revert "Update OOUI to v0.47.3"

Reason:

We landed v0.47.4 instead.

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

Thanks for taking care folks. :-)

Thanks @AnneT!

Looks like this will be included in wmf.17 automatically, so no backporting or other work is needed.