Page MenuHomePhabricator

Can't save changes in VE when temp accounts are enabled: jQuery.Deferred exception: matchPatterns is null
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):
Edit a page using VE while logged out and temp accounts are enabled. For example, https://patchdemo.wmflabs.org/wikis/a61a6b72be/w/index.php?title=Main_Page&veaction=edit. This results in an exception in the save dialog: jQuery.Deferred exception: matchPatterns is null (from mw.util code), and the edit is not saved.

Event Timeline

That commit does indeed look suspicious.

The error is in mw.util.isTemporaryUser -- just calling that from the console triggers it, no need to interact with VE at all.

It does:

		var matchPatterns = config.AutoCreateTempUser.matchPattern;
		if ( typeof matchPatterns === 'string' ) {
			matchPatterns = [ matchPatterns ];
		}
		for ( var i = 0; i < matchPatterns.length; i++ ) {

But config.AutoCreateTempUser.matchPattern is null.

Hmm. I am not able to reproduce this locally or on beta cluster. After a very quick glance at Patch Demo config, I don't see issues there.

Ah this is T367108: Default temporary user config causes a JavaScript error - @matmarex and @DLynch are right. It's on our mini-hackathon list to solve this week.

Fixed by the changes in subtask.