Page MenuHomePhabricator

TypeError: title is undefined
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error

MediaWiki version: 1.36.0-wmf.33

message
TypeError: title is undefined
exception.trace
n/a

Impact

Help panel fails to load if the user does not have an assigned mentor

Notes

I think this resulted from code changed in T273118: Help panel: Remove dependency on Help Desk title existing and/or T275908: Scale: default to mentorship questions from help panel, where we started defaulting the help panel question to the mentor page. If the user doesn't have a mentor assigned (rare, but can happen) then this code in HelpPanelProcessDialog.js errors:

if ( this.askSource === 'mentor-homepage' ) {
    mentorName = mw.config.get( 'GEHomepageMentorshipMentorName' );
} else { // mentor-helppanel
    mentorName = mw.config.get( 'wgGEHelpPanelMentorData' ).name;
}
mentorTalkLinkText = mw.message(
    'growthexperiments-homepage-mentorship-questionreview-header-mentor-talk-link-text',
    mentorName, userName ).text();
$mentorTalkLink = $( '<a>' )
    .attr( {
        href: mw.Title.newFromText( mentorName, 3 ).getUrl(),
        target: '_blank',
            'data-link-id': 'mentor-talk'
    } )
    .text( mentorTalkLinkText );

Logstash filtered to this error: https://logstash.wikimedia.org/goto/c1142d1eadd619a81be775b68797bb48

Details

Request URL
https://th.wikipedia.org/w/load.php?

Event Timeline

kostajh triaged this task as Medium priority.Mar 8 2021, 11:08 AM

This problem should have been solved by https://gerrit.wikimedia.org/r/c/mediawiki/extensions/GrowthExperiments/+/670021 which was backported to wmf.33 and wmf.34. But for some reason this code is not actually being served in production, and the wmf.32 version of the erroring JS was being served.

@Urbanecm_WMF updated the submodule for GrowthExperiments in the wmf.34 release branch and synced that.