Page MenuHomePhabricator

TypeError: title is undefined
Closed, ResolvedPublicPRODUCTION ERROR



MediaWiki version: 1.36.0-wmf.33

TypeError: title is undefined


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


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(
    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:


Request URL

Event Timeline

This problem should have been solved by 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.