Page MenuHomePhabricator

“Internal Error” when moving a file to incorrect namespace on Commons-like wikis
Closed, ResolvedPublic


Instead of neat error message ([[MediaWiki:Imagenocrossnamespace]]) seen at wikis with local file repos, I see “Internal Error” and this:

"RepoGroup::findFile recieved an Title object with incorrect namespace"
#0 /usr/local/apache/common-local/php-1.17/includes/GlobalFunctions.php(3309): RepoGroup->findFile(Object(Title), Array)
#1 /usr/local/apache/common-local/php-1.17/includes/Title.php(3041): wfFindFile(Object(Title))
#2 /usr/local/apache/common-local/php-1.17/includes/Title.php(3102): Title->isValidMoveOperation(Object(Title), true, '')
#3 /usr/local/apache/common-local/php-1.17/includes/specials/SpecialMovepage.php(399): Title->moveTo(Object(Title), true, '', true)
#4 /usr/local/apache/common-local/php-1.17/includes/specials/SpecialMovepage.php(90): MovePageForm->doSubmit()
#5 /usr/local/apache/common-local/php-1.17/includes/SpecialPage.php(578): MovePageForm->execute(NULL)
#6 /usr/local/apache/common-local/php-1.17/includes/Wiki.php(252): SpecialPage::executePath(Object(Title))
#7 /usr/local/apache/common-local/php-1.17/includes/Wiki.php(63): MediaWiki->handleSpecialCases(Object(Title), Object(OutputPage), Object(WebRequest))
#8 /usr/local/apache/common-local/php-1.17/index.php(114): MediaWiki->performRequestForTitle(Object(Title), NULL, Object(OutputPage), Object(User), Object(WebRequest))
#9 /usr/local/apache/common-local/live-1.5/index.php(3): require('/usr/local/apac...')
#10 {main}

Version: unspecified
Severity: minor



Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 21 2014, 11:56 PM
bzimport set Reference to bz31213.
bzimport added a subscriber: Unknown Object (MLST).

Bryan.TongMinh wrote:

We should return immediately from Title::validateFileMoveOperation after the check for 'imagenocrossnamespace' if it failed.

And while we're at it, we could use some unit tests in Title::isValidMoveOperation()

Just to clarify, this is on Wikimedia commons? wmf Wikis that are using Wikimedia commons as a ForeignDBRepo, something else? Are you moving via special:movepage or the api?

I'm having trouble reproducing this, however I can certainly see several things that look scary in the relevant code that need to be fixed.

Gilles triaged this task as Unbreak Now! priority.Dec 4 2014, 10:10 AM
Gilles moved this task from Untriaged to Done on the Multimedia board.
Gilles lowered the priority of this task from Unbreak Now! to Needs Triage.Dec 4 2014, 11:21 AM