Page MenuHomePhabricator

Uncaught Error: Invalid pageId: undefined (when selecting template from category picker)
Closed, ResolvedPublicBUG REPORT

Description

Found during deployment of T377975: Enable template favouriting on Beta, pilot wikis, and test, decided to continue with deployment and fix after


Steps to replicate the issue (include links if applicable):

What happens?:

Uncaught Error: Invalid pageId: undefined
    at parsePageId (load.php?lang=en&modules=ext.CodeMirror.v6%7Cext.CodeMirror.v6.lib%7Cext.templateData.templateDiscovery%7Cjquery%2Coojs-ui-core%7Cjquery.ui%7Cmediawiki.base&skin=vector&version=16fzz:661:865)
    at FavoritesStore.js.FavoritesStore.isFavorite (load.php?lang=en&modules=ext.CodeMirror.v6%7Cext.CodeMirror.v6.lib%7Cext.templateData.templateDiscovery%7Cjquery%2Coojs-ui-core%7Cjquery.ui%7Cmediawiki.base&skin=vector&version=16fzz:662:909)
    at new FavoriteButton (load.php?lang=en&modules=ext.CodeMirror.v6%7Cext.CodeMirror.v6.lib%7Cext.templateData.templateDiscovery%7Cjquery%2Coojs-ui-core%7Cjquery.ui%7Cmediawiki.base&skin=vector&version=16fzz:664:266)
    at new MWTemplateWizardTemplateTitleBar (ext.TemplateWizard.TemplateTitleBar.js:31:26)
    at mw.TemplateWizard.TemplateForm.getForm (ext.TemplateWizard.TemplateForm.js:71:26)
    at new MWTemplateWizardTemplateForm (ext.TemplateWizard.TemplateForm.js:24:27)
    at mw.TemplateWizard.Dialog.showTemplate (ext.TemplateWizard.Dialog.js:97:22)
    at OO.EventEmitter.emit (oojs.js:858:12)
    at TemplateSearchLayout.js.TemplateSearchLayout.onAddTemplate (load.php?lang=en&modules=ext.CodeMirror.v6%7Cext.CodeMirror.v6.lib%7Cext.templateData.templateDiscovery%7Cjquery%2Coojs-ui-core%7Cjquery.ui%7Cmediawiki.base&skin=vector&version=16fzz:649:636)
    at OO.EventEmitter.emit (oojs.js:858:12)

What should have happened instead?:
Template should have been selected, and the dialog progressed to the next screen

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):

  • nb selecting a favourited template works correctly

image.png (706×1 px, 227 KB)

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
TheresNoTime changed the task status from Open to In Progress.Jun 4 2025, 12:17 PM
TheresNoTime claimed this task.
TheresNoTime edited projects, added Community-Tech (Fox Squad); removed Community-Tech.

Change #1153603 had a related patch set uploaded (by Samtar; author: Samtar):

[mediawiki/extensions/TemplateData@master] ext.templateData.templateDiscovery: Expose pageId in to category browser

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

Change #1153603 merged by jenkins-bot:

[mediawiki/extensions/TemplateData@master] ext.templateData.templateDiscovery: Expose pageId in to category browser

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

Change #1153622 had a related patch set uploaded (by Samtar; author: Samtar):

[mediawiki/extensions/TemplateData@wmf/1.45.0-wmf.4] ext.templateData.templateDiscovery: Expose pageId in to category browser

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

Change #1153622 abandoned by Samtar:

[mediawiki/extensions/TemplateData@wmf/1.45.0-wmf.4] ext.templateData.templateDiscovery: Expose pageId in to category browser

Reason:

oh that won't work..

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