Last modified: 2012-04-16 09:15:42 UTC
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" Backtrace: #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}
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.
r98426