Page MenuHomePhabricator

RelatedArticles JS exception
Closed, ResolvedPublic

Description

On visiting http://en.m.wikipedia.beta.wmflabs.org/wiki/Samurai?mobileaction=beta

I see
Exception in module-execute in module ext.relatedArticles.readMore.bootstrap:
load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=minerva&version=YnvhQe2A:177 TypeError: Cannot read property 'slice' of null TypeError: Cannot read property 'slice' of null(…)

Doesn't seem to break anything but should investigate asap.

Event Timeline

Jdlrobson raised the priority of this task from to High.
Jdlrobson updated the task description. (Show Details)
Jdlrobson added a project: RelatedArticles.
Jdlrobson added a subscriber: Jdlrobson.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 27 2015, 2:55 PM

Change 249876 had a related patch set uploaded (by Jdlrobson):
mw.config.get doesn't work that way.

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

Change 249876 merged by jenkins-bot:
mw.config.get doesn't work that way.

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

Jdlrobson closed this task as Resolved.Nov 2 2015, 8:09 PM
phuedx added a subscriber: phuedx.Nov 2 2015, 8:10 PM

For posterity, [mw.config.get does work that way](https://github.com/wikimedia/mediawiki/blob/master/resources/src/mediawiki/mediawiki.js#L116). However, the fallback parameter is only returned when the value isn't set in the config, i.e. wgRelatedArticles was being set to null and not [].