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 subscribed.

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

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 [].