https://bugzilla.wikimedia.org/show_bug.cgi?id=57964
Web browser: --- Bug ID: 57964 Summary: Importing an invalid gettext file causes "Fatal exception of type MWException" Product: MediaWiki extensions Version: unspecified Hardware: All OS: All Status: NEW Severity: minor Priority: Unprioritized Component: Translate Assignee: wikibugs-l@lists.wikimedia.org Reporter: tba...@wikimedia.org CC: alolita.sha...@gmail.com, asha...@wikimedia.org, kartik.mis...@gmail.com, niklas.laxst...@gmail.com, run...@gmail.com, s.mazel...@xs4all.nl, santhosh.thottin...@gmail.com Classification: Unclassified Mobile Platform: --- Steps to reproduce: * Create a .po file that solely consist of the text "test" * Upload this file at https://meta.wikimedia.org/wiki/Special:ImportTranslations This results in an internal error page: "Fatal exception of type MWException" Instead, the user should receive a proper error message, if possible with more detail about the invalid parts. The corresponding internal error on testwiki at least tells the user that file lacks a valid header: * Upload the file at https://test.wikipedia.org/wiki/Special:ImportTranslations This results in the following error message: Internal error - Test {{SITENAME}} [609c3d98] /wiki/Special:ImportTranslations Exception from line 107 of /usr/local/apache/common-local/php-1.23wmf5/extensions/Translate/ffs/GettextFFS.php: Gettext file header was not found: test Backtrace: #0 /usr/local/apache/common-local/php-1.23wmf5/extensions/Translate/ffs/GettextFFS.php(67): GettextFFS::parseGettextData(string, boolean, StringMatcher, string) #1 /usr/local/apache/common-local/php-1.23wmf5/extensions/Translate/ffs/GettextFFS.php(47): GettextFFS->parseGettext(string) #2 /usr/local/apache/common-local/php-1.23wmf5/extensions/Translate/specials/SpecialImportTranslations.php(196): GettextFFS->readFromVariable(string) #3 /usr/local/apache/common-local/php-1.23wmf5/extensions/Translate/specials/SpecialImportTranslations.php(70): SpecialImportTranslations->parseFile(string) #4 /usr/local/apache/common-local/php-1.23wmf5/includes/SpecialPage.php(670): SpecialImportTranslations->execute(NULL) #5 /usr/local/apache/common-local/php-1.23wmf5/includes/SpecialPageFactory.php(488): SpecialPage->run(NULL) #6 /usr/local/apache/common-local/php-1.23wmf5/includes/Wiki.php(298): SpecialPageFactory::executePath(Title, RequestContext) #7 /usr/local/apache/common-local/php-1.23wmf5/includes/Wiki.php(596): MediaWiki->performRequest() #8 /usr/local/apache/common-local/php-1.23wmf5/includes/Wiki.php(460): MediaWiki->main() #9 /usr/local/apache/common-local/php-1.23wmf5/index.php(49): MediaWiki->run() #10 /usr/local/apache/common-local/w/index.php(3): require(string) #11 {main} -- You are receiving this mail because: You are the assignee for the bug. You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l