Page MenuHomePhabricator

"Add a caption" is broken
Closed, ResolvedPublic

Description

The "add a caption" button in the captions panel is currently broken on beta/local.
It doesn't add a captions row, but instead shows this error in console:

Uncaught TypeError: Cannot read property 'filter' of undefined
    at CaptionsPanel.createIndexedEditableRow (load.php?lang=en&modules=ext.uls.common%2Ccompactlinks%2Cinterface|jquery%2Coojs-ui-core%2Coojs-ui-widgets%2Coojs-ui-windows|jquery.uls|mediawiki.ui.button%2Cicon|mmv.bootstrap|oojs-ui-core.styles|wikibase.mediainfo.filePageDisplay%2Cstatements&skin=vector&version=18qbuys:559)
    at CaptionsPanel.addNewEditableLanguageRow (load.php?lang=en&modules=ext.uls.common%2Ccompactlinks%2Cinterface|jquery%2Coojs-ui-core%2Coojs-ui-widgets%2Coojs-ui-windows|jquery.uls|mediawiki.ui.button%2Cicon|mmv.bootstrap|oojs-ui-core.styles|wikibase.mediainfo.filePageDisplay%2Cstatements&skin=vector&version=18qbuys:569)
    at load.php?lang=en&modules=ext.uls.common%2Ccompactlinks%2Cinterface|jquery%2Coojs-ui-core%2Coojs-ui-widgets%2Coojs-ui-windows|jquery.uls|mediawiki.ui.button%2Cicon|mmv.bootstrap|oojs-ui-core.styles|wikibase.mediainfo.filePageDisplay%2Cstatements&skin=vector&version=18qbuys:549
    at OoUiButtonWidget.oo.EventEmitter.emit (<anonymous>:274:486)
    at OoUiButtonWidget.OO.ui.mixin.ButtonElement.onClick (load.php?lang=en&modules=ext.uls.common%2Ccompactlinks%2Cinterface|jquery%2Coojs-ui-core%2Coojs-ui-widgets%2Coojs-ui-windows|jquery.uls|mediawiki.ui.button%2Cicon|mmv.bootstrap|oojs-ui-core.styles|wikibase.mediainfo.filePageDisplay%2Cstatements&skin=vector&version=18qbuys:203)
    at HTMLAnchorElement.dispatch (load.php?lang=en&modules=ext.uls.common%2Ccompactlinks%2Cinterface|jquery%2Coojs-ui-core%2Coojs-ui-widgets%2Coojs-ui-windows|jquery.uls|mediawiki.ui.button%2Cicon|mmv.bootstrap|oojs-ui-core.styles|wikibase.mediainfo.filePageDisplay%2Cstatements&skin=vector&version=18qbuys:94)
    at HTMLAnchorElement.elemData.handle (load.php?lang=en&modules=ext.uls.common%2Ccompactlinks%2Cinterface|jquery%2Coojs-ui-core%2Coojs-ui-widgets%2Coojs-ui-windows|jquery.uls|mediawiki.ui.button%2Cicon|mmv.bootstrap|oojs-ui-core.styles|wikibase.mediainfo.filePageDisplay%2Cstatements&skin=vector&version=18qbuys:90)

Acceptance criteria:

On https://commons.wikimedia.beta.wmflabs.org/wiki/File:Photo_on_08-02-2019_at_16.35.jpg

When captions panel is in edit mode:

  • "Add a caption" should add a captions row (without errors in console)

QA Results

ACStatusDetails
1T227798#5347889

Details

Related Gerrit Patches:
mediawiki/extensions/WikibaseMediaInfo : masterBetter guard against missing data

Event Timeline

Restricted Application added a project: Multimedia. · View Herald TranscriptJul 11 2019, 4:31 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Ramsey-WMF triaged this task as High priority.Jul 11 2019, 4:45 PM
Ramsey-WMF moved this task from Untriaged to Next up on the Multimedia board.
Ramsey-WMF added a subscriber: Ramsey-WMF.

Oooh. Sweet regression :) Let's fix it quickly.

Change 522431 had a related patch set uploaded (by Matthias Mullie; owner: Matthias Mullie):
[mediawiki/extensions/WikibaseMediaInfo@master] Better guard against missing data

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

Change 522431 merged by jenkins-bot:
[mediawiki/extensions/WikibaseMediaInfo@master] Better guard against missing data

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

I stumbled upon this bug on commons.wikimedia.org right now.
I can confirm the bug is fixed on commons.wikimedia.beta.wmflabs.org thanks, looking forward to the release.

Edtadros reassigned this task from Edtadros to Ramsey-WMF.Jul 18 2019, 9:06 PM
Edtadros added a subscriber: Edtadros.

Test Result

Status: ✅ PASS
OS: macOS Mojave
Browser: Chrome
Device: MBP

Test Artifact(s):

QA Steps

On https://commons.wikimedia.beta.wmflabs.org/wiki/File:Photo_on_08-02-2019_at_16.35.jpg
AC1: When captions panel is in edit mode: "Add a caption" should add a captions row (without errors in console)

Edtadros updated the task description. (Show Details)Jul 18 2019, 9:07 PM
Ramsey-WMF closed this task as Resolved.Jul 31 2019, 6:14 PM

Tested on production. Working fine in Chrome and Firefox.