Page MenuHomePhabricator

Apply translation does not work: Cannot read properties of undefined (reading 'getTitleForLanguage')
Open, In Progress, MediumPublic2 Estimated Story PointsBUG REPORT

Description

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

What happens?:
Translation does not load

image.png (888×1 px, 286 KB)

What should have happened instead?:
Translation should have been loaded and applied.

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

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

Cannot read properties of undefined (reading 'getTitleForLanguage')
at https://it.wikipedia.org/w/load.php?lang=it&modules=ext.centralNotice.geoIP%7Cext.centralauth.ForeignApi%7Cext.centralauth.centralautologin.clearcookie%7Cext.checkUser.clientHints%7Cext.cx.articlefilters%2Cmodel%7Cext.cx.eventlogging.campaigns%7Cext.dismissableSiteNotice%2CeventLogging%2CnavigationTiming%2Cpopups%2CwikimediaEvents%2CxLab%7Cext.echo.api%2Cinit%7Cext.eventLogging.metricsPlatform%7Cext.growthExperiments.HelpPanel.init%7Cext.growthExperiments.SuggestedEditSession%7Cext.uls.common%2Ccompactlinks%2Cinterface%2Cpreferences%2Cwebfonts%7Cext.urlShortener.toolbar%7Cext.wikimediaEvents.xLab%7Cjquery%2Coojs%2Csite%2Cvue%2Cvuex%7Cjquery.client%2CtextSelection%7Cjquery.uls.data%7Cmediawiki.ForeignApi%2CString%2CTitle%2Capi%2Cbase%2Ccldr%2Ccookie%2Cexperiments%2CjqueryMsg%2Clanguage%2Cstorage%2Cuser%2Cutil%2CvisibleTimeout%7Cmediawiki.ForeignApi.core%7Cmediawiki.editfont.styles%7Cmediawiki.libs.pluralruleparser%7Cmediawiki.page.ready%7Cmw.cx.SiteMapper%2Ceventlogging%2Cutil%7Cmw.cx3&skin=contenttranslation&version=1nq9x:841:596

Source: https://logstash.wikimedia.org/app/discover#/doc/logstash-*/logstash-default-1-7.0.0-1-2025.11.18?id=8HcmlpoB9tkJMVA5owSw

  • 28 November, 2025 - 264 occurences in the last 10 days - 2nd most frequent error.

Event Timeline

abi_ triaged this task as Medium priority.Nov 18 2025, 8:57 AM
abi_ moved this task from Backlog to Ready for dev on the LPL Essential (FY2025-26 Q2) board.
abi_ set the point value for this task to 2.
Wangombe changed the task status from Open to In Progress.Nov 25 2025, 9:11 AM
Wangombe claimed this task.
Wangombe moved this task from Ready for dev to In Progress on the LPL Essential (FY2025-26 Q2) board.

Is it possible to provide more information about this bug? I tried replicating this with Google and MinT. None produced the results in the ticket description.

Is it possible to provide more information about this bug? I tried replicating this with Google and MinT. None produced the results in the ticket description.

Figuring out the cause is part of the task. This needs debugging. Looking for clues in Logstash, reading the code and generating hypothesis how it may fail, possibly adding more logging to learn more, etc.

Change #1228492 had a related patch set uploaded (by Wangombe; author: Wangombe):

[mediawiki/extensions/ContentTranslation@master] CX: Add a null check to getTitleForLanguage

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

The error still occurs (121 occurrences last week).

The root cause of the issue is that the language links for the currently selected article could not be fetched/stored successfully. Adding null checks to the current point of failure, will just close this task and open a new one.

My suggestion is that we need to improve the error handling for the failed API requests, especially for data that are crucial for the application. Until then, we can keep this task open and maybe lower its priority for now.