Page MenuHomePhabricator

MalformedTitleException: The requested page title contains invalid characters: "}".
Closed, ResolvedPublic1 Estimated Story PointsPRODUCTION ERROR

Description

Error
normalized_message
[{reqId}] {exception_url}   MalformedTitleException: The requested page title contains invalid characters: "}".
exception.trace
from /srv/mediawiki/php-1.39.0-wmf.22/includes/title/MediaWikiTitleCodec.php(92)
#0 /srv/mediawiki/php-1.39.0-wmf.22/includes/title/MediaWikiTitleCodec.php(488): MediaWikiTitleCodec::{closure}(string, string, array)
#1 /srv/mediawiki/php-1.39.0-wmf.22/includes/title/MediaWikiTitleCodec.php(191): MediaWikiTitleCodec->splitTitleString(string, integer)
#2 /srv/mediawiki/php-1.39.0-wmf.22/extensions/FileImporter/src/Data/ImportPlan.php(147): MediaWikiTitleCodec->parseTitle(string, integer)
#3 /srv/mediawiki/php-1.39.0-wmf.22/extensions/FileImporter/src/Data/ImportPlan.php(162): FileImporter\Data\ImportPlan->getTitle()
#4 /srv/mediawiki/php-1.39.0-wmf.22/extensions/FileImporter/src/Html/ChangeFileNameForm.php(26): FileImporter\Data\ImportPlan->getFileName()
#5 /srv/mediawiki/php-1.39.0-wmf.22/extensions/FileImporter/src/Html/RecoverableTitleExceptionPage.php(28): FileImporter\Html\ChangeFileNameForm->getHtml(FileImporter\Data\ImportPlan)
#6 /srv/mediawiki/php-1.39.0-wmf.22/extensions/FileImporter/src/SpecialImportFile.php(236): FileImporter\Html\RecoverableTitleExceptionPage->getHtml(FileImporter\Exceptions\RecoverableTitleException)
#7 /srv/mediawiki/php-1.39.0-wmf.22/includes/specialpage/SpecialPage.php(690): FileImporter\SpecialImportFile->execute(NULL)
#8 /srv/mediawiki/php-1.39.0-wmf.22/includes/specialpage/SpecialPageFactory.php(1423): SpecialPage->run(NULL)
#9 /srv/mediawiki/php-1.39.0-wmf.22/includes/MediaWiki.php(316): MediaWiki\SpecialPage\SpecialPageFactory->executePath(string, RequestContext)
#10 /srv/mediawiki/php-1.39.0-wmf.22/includes/MediaWiki.php(911): MediaWiki->performRequest()
#11 /srv/mediawiki/php-1.39.0-wmf.22/includes/MediaWiki.php(568): MediaWiki->main()
#12 /srv/mediawiki/php-1.39.0-wmf.22/index.php(50): MediaWiki->run()
#13 /srv/mediawiki/php-1.39.0-wmf.22/index.php(46): wfIndexMain()
#14 /srv/mediawiki/w/index.php(3): require(string)
#15 {main}
Impact
  • Not happening very often—9 in 7 days
  • Might be a message for the user rather than the error logs
Notes
  • Seeing this for a handful of different characters: }, ], a few other urlencoded chars

Details

Request URL
https://commons.wikimedia.org/wiki/Special:ImportFile

Event Timeline

Manuel subscribed.

Thank you for reporting this! Pinging [DEPRECATED] wdwb-tech about this.

WMDE-Fisch subscribed.

Thank you for reporting this! Pinging [DEPRECATED] wdwb-tech about this.

I think this has nothing to do with [DEPRECATED] wdwb-tech wired that these tags where added in the first place. 🤔

Hi @WMDE-Fisch, thx for looking into this! Could you please elaborate a bit?

Hi @WMDE-Fisch, thx for looking into this! Could you please elaborate a bit?

Sure, no problem. Looking at the stack trace posted above, the error is triggered when trying to import a file using the Move-Files-To-Commons extensions. Eventually the path leads to MediaWikiTitleCodec in core where the exception is thrown. As far as I can tell there is no involvement of Wikibase code.

The error mentioning an invalid character in the title string also seems more like a hint into the direction of weird urlencoding IMO.

Change 819001 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[mediawiki/extensions/FileImporter@master] Fix MalformedTitleException on change file name form

https://gerrit.wikimedia.org/r/819001

Change 819001 merged by jenkins-bot:

[mediawiki/extensions/FileImporter@master] Fix MalformedTitleException on change file name form

https://gerrit.wikimedia.org/r/819001