Last modified: 2012-04-16 09:15:42 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T33213, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 31213 - “Internal Error” when moving a file to incorrect namespace on Commons-like wikis
“Internal Error” when moving a file to incorrect namespace on Commons-like wikis
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
File management (Other open bugs)
unspecified
All All
: Unprioritized minor with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-09-28 15:25 UTC by Kalan
Modified: 2012-04-16 09:15 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Kalan 2011-09-28 15:25:34 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}
Comment 1 Bryan Tong Minh 2011-09-28 15:59:40 UTC
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()
Comment 2 Bawolff (Brian Wolff) 2011-09-28 19:44:21 UTC
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.
Comment 3 Bryan Tong Minh 2011-09-29 18:36:32 UTC
r98426

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links