https://bugzilla.wikimedia.org/show_bug.cgi?id=62849
Bug ID: 62849 Summary: ResourceLoader: Internal error when calling with load.php with invalid uselang Product: MediaWiki Version: unspecified Hardware: All OS: All Status: NEW Severity: trivial Priority: Unprioritized Component: ResourceLoader Assignee: wikibugs-l@lists.wikimedia.org Reporter: krinklem...@gmail.com CC: krinklem...@gmail.com, roan.katt...@gmail.com, tpars...@wikimedia.org Web browser: --- Mobile Platform: --- Not a high priority since this is only relevant to requests that are invalid and are never formed by MediaWiki itself, but an ugly way to handle the error. When accessing index.php with an invalid uselang, it gets sanitised to 'en' by Wiki.php -> RequestContext.php#sanitizeLangCode. On the load.php path, it results in an MWException from Language::newFromCode exception 'MWException' with message 'Invalid language code "x:' in mediawiki/languages/Language.php:217 Stack trace: #0 mediawiki/languages/Language.php(196): Language::newFromCode('x:') #1 mediawiki/includes/resourceloader/ResourceLoaderContext.php(162): Language::factory('x:') #2 mediawiki/includes/resourceloader/ResourceLoaderContext.php(237): ResourceLoaderContext->getDirection() #3 mediawiki/includes/resourceloader/ResourceLoaderWikiModule.php(224): ResourceLoaderContext->getHash() #4 mediawiki/includes/resourceloader/ResourceLoaderWikiModule.php(179): ResourceLoaderWikiModule->getTitleMtimes(Object(ResourceLoaderContext)) #5 mediawiki/includes/resourceloader/ResourceLoader.php(514): ResourceLoaderWikiModule->getModifiedTime(Object(ResourceLoaderContext)) #6 mediawiki/load.php(43): ResourceLoader->respond(Object(ResourceLoaderContext)) #7 {main} ResourceLoader::makeModuleResponse: generating module package failed: exception 'MWException' with message 'Invalid language code "x:"' in /usr/local/apache/common-local/php-1.23wmf17/languages/Language.php:217 Stack trace: #0 /usr/local/apache/common-local/php-1.23wmf17/languages/Language.php(196): Language::newFromCode('x:') #1 /usr/local/apache/common-local/php-1.23wmf17/includes/resourceloader/ResourceLoaderContext.php(162): Language::factory('x:') #2 /usr/local/apache/common-local/php-1.23wmf17/includes/resourceloader/ResourceLoaderModule.php(118): ResourceLoaderContext->getDirection() #3 /usr/local/apache/common-local/php-1.23wmf17/includes/resourceloader/ResourceLoaderWikiModule.php(158): ResourceLoaderModule->getFlip(Object(ResourceLoaderContext)) #4 /usr/local/apache/common-local/php-1.23wmf17/includes/resourceloader/ResourceLoader.php(778): ResourceLoaderWikiModule->getStyles(Object(ResourceLoaderContext)) #5 /usr/local/apache/common-local/php-1.23wmf17/includes/resourceloader/ResourceLoader.php(518): ResourceLoader->makeModuleResponse(Object(ResourceLoaderContext), Array, Array) #6 /usr/local/apache/common-local/php-1.23wmf17/load.php(43): ResourceLoader->respond(Object(ResourceLoaderContext)) #7 /usr/local/apache/common-local/w/load.php(3): require('/usr/local/apac...') #8 {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