Author: jgonera
Description:
If you misspell the file name in Resources.php, the whole module will not be loaded without any error message.
Version: unspecified
Severity: normal
Author: jgonera
Description:
If you misspell the file name in Resources.php, the whole module will not be loaded without any error message.
Version: unspecified
Severity: normal
bingle-admin wrote:
Prioritization and scheduling of this bug is tracked on Mingle card https://wikimedia.mingle.thoughtworks.com/projects/mobile/cards/1329
Actually it does check for non-existance of a file so I'm unclear what kind of failure do you want?
Should it load the entire module without that template? Isn't that worse?
If you look at the JavaScript for the module with an invalid template it looks like this:
/*
exception 'MWException' with message 'MFResourceLoaderModule::getTemplateScript: template file not found: "/Users/jrobson/Sites/w/extensions/MobileFrontend/templates/overlays/notificationz.html"' in /Users/jrobson/Sites/w/extensions/MobileFrontend/includes/modules/MFResourceLoaderModule.php:85
Stack trace:
#0 /Users/jrobson/Sites/w/extensions/MobileFrontend/includes/modules/MFResourceLoaderModule.php(145): MFResourceLoaderModule->getTemplateScript()
#1 /Users/jrobson/Sites/w/includes/resourceloader/ResourceLoader.php(755): MFResourceLoaderModule->getScript(Object(ResourceLoaderContext))
#2 /Users/jrobson/Sites/w/includes/resourceloader/ResourceLoader.php(517): ResourceLoader->makeModuleResponse(Object(ResourceLoaderContext), Array, Array)
#3 /Users/jrobson/Sites/w/load.php(43): ResourceLoader->respond(Object(ResourceLoaderContext))
#4 {main}
*/
mw.loader.state({"mobile.beta.common":"missing"});
/* cache key: my_wiki:resourceloader:filter:minify-js:7:81f0ab7a7bc627ae9c0157fe6df772e6 */
https://gerrit.wikimedia.org/r/91658
is an alternative approach but I'm not sure if it is any better.