Page MenuHomePhabricator

Error: Invalid pageId: undefined (FavoriteStore)
Closed, ResolvedPublicPRODUCTION ERROR

Description

1,923 errors in last 7 days on multiple wikis https://logstash.wikimedia.org/goto/95f145ba7a46cc7e27ea23cc8ae273e2

at parsePageId  https://fr.wikipedia.org/w/load.php?lang=fr&modules=ext.templateData.templateDiscovery&skin=vector-2022&version=1qrqc:20:31
at FavoritesStore.js.FavoritesStore.isFavorite  https://fr.wikipedia.org/w/load.php?lang=fr&modules=ext.templateData.templateDiscovery&skin=vector-2022&version=1qrqc:21:95
at new FavoriteButton  https://fr.wikipedia.org/w/load.php?lang=fr&modules=ext.templateData.templateDiscovery&skin=vector-2022&version=1qrqc:22:266
at new VeUiMWTemplatePage  https://fr.wikipedia.org/w/load.php?lang=fr&modules=ext.visualEditor.core%2Cmwtransclusion&skin=vector-2022&version=3j9cm:1125:684
at VeUiMWTransclusionDialog.getPageFromPart  https://fr.wikipedia.org/w/load.php?lang=fr&modules=ext.visualEditor.core%2Cmwtransclusion&skin=vector-2022&version=3j9cm:1146:291
at VeUiMWTransclusionDialog.getPageFromPart  https://fr.wikipedia.org/w/load.php?lang=fr&modules=ext.visualEditor.core%2Cmwtransclusion&skin=vector-2022&version=3j9cm:1158:501
at VeUiMWTransclusionDialog.onReplacePart  https://fr.wikipedia.org/w/load.php?lang=fr&modules=ext.visualEditor.core%2Cmwtransclusion&skin=vector-2022&version=3j9cm:1144:387
at VeUiMWTransclusionDialog.onReplacePart  https://fr.wikipedia.org/w/load.php?lang=fr&modules=ext.visualEditor.core%2Cmwtransclusion&skin=vector-2022&version=3j9cm:1155:1017
at OO.EventEmitter.emit  https://fr.wikipedia.org/w/load.php?lang=fr&modules=oojs&skin=vector-2022&version=rwdvu:8:193
at VeDmMWTransclusionModel.resolveChangeQueue  https://fr.wikipedia.org/w/load.php?lang=fr&modules=ext.visualEditor.core%2Cmwtransclusion&skin=vector-2022&version=3j9cm:1088:441

Stack trace seems to point to https://gerrit.wikimedia.org/g/mediawiki/extensions/TemplateData/+/f90675b4cb24ca0956b614acf070091915ffe1ed/modules/ext.templateData.templateDiscovery/FavoritesStore.js#128

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

What happens?:

What should have happened instead?:

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

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

Event Timeline

Restricted Application changed the subtype of this task from "Bug Report" to "Production Error". · View Herald TranscriptAug 15 2025, 3:24 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change #1179292 had a related patch set uploaded (by Samwilson; author: Samwilson):

[mediawiki/extensions/VisualEditor@master] Only show template favoriting button if the template exists

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

This appears to happen when inserting a template that doesn't exist. We shouldn't show the favorite button for those templates.

Change #1179292 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Only show template favoriting button if the template exists

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

dom_walden subscribed.

I don't see the favourite icon on non-existent template pages.