Page MenuHomePhabricator

Review all Resource Loader module definitions for case-sensitivity issues [4H]
Closed, ResolvedPublicBUG REPORT

Description

What is the problem?

We are seeing this error a lot on beta:

2021-11-08 15:48:38 [YYlG1i04-fG3yGWMjh5LGgAAAA4] deployment-mediawiki11 enwiki 1.38.0-alpha exception ERROR: [YYlG1i04-fG3yGWMjh5LGgAAAA4] /w/load.php?lang=en&modules=ext.ipInfo.preferences%7Cjquery%2Coojs-ui-core%2Coojs-ui-widgets&skin=vector&version=c00l7   RuntimeException: ResourceLoaderFileModule::getFileContents: package file not found, or is not a file: "/srv/mediawiki/php-master/extensions/IPInfo/modules/ext.ipInfo.preferences/preferences.js" {"exception_url":"/w/load.php?lang=en&modules=ext.ipInfo.preferences%7Cjquery%2Coojs-ui-core%2Coojs-ui-widgets&skin=vector&version=c00l7","reqId":"YYlG1i04-fG3yGWMjh5LGgAAAA4","caught_by":"other"} 
[Exception RuntimeException] (/srv/mediawiki/php-master/includes/resourceloader/ResourceLoaderFileModule.php:507) ResourceLoaderFileModule::getFileContents: package file not found, or is not a file: "/srv/mediawiki/php-master/extensions/IPInfo/modules/ext.ipInfo.preferences/preferences.js"
  #0 /srv/mediawiki/php-master/includes/resourceloader/ResourceLoaderFileModule.php(1398): ResourceLoaderFileModule->getFileContents(string, string)
  #1 /srv/mediawiki/php-master/includes/resourceloader/ResourceLoaderFileModule.php(365): ResourceLoaderFileModule->getPackageFiles(ResourceLoaderContext)
  #2 /srv/mediawiki/php-master/includes/resourceloader/ResourceLoaderModule.php(779): ResourceLoaderFileModule->getScript(ResourceLoaderContext)
  #3 /srv/mediawiki/php-master/includes/resourceloader/ResourceLoaderModule.php(747): ResourceLoaderModule->buildContent(ResourceLoaderContext)
  #4 /srv/mediawiki/php-master/includes/resourceloader/ResourceLoader.php(1137): ResourceLoaderModule->getModuleContent(ResourceLoaderContext)
  #5 /srv/mediawiki/php-master/includes/resourceloader/ResourceLoader.php(839): ResourceLoader->makeModuleResponse(ResourceLoaderContext, array, array)
  #6 /srv/mediawiki/php-master/load.php(52): ResourceLoader->respond(ResourceLoaderContext)
  #7 /srv/mediawiki/php-master/load.php(38): wfLoadMain()
  #8 /srv/mediawiki/w/load.php(3): require(string)
  #9 {main}

I think it might be a case-sensitivity issue. I notice that /srv/mediawiki/php-master/extensions/IPInfo/modules/ext.ipinfo.preferences/preferences.js does exist, but the code is looking for /srv/mediawiki/php-master/extensions/IPInfo/modules/ext.ipInfo.preferences/preferences.js.

@phuedx says it might be worth "...reviewing all Resource Loader module definitions for case-sensitivity issues."

Steps to reproduce problem

Navigate to https://en.wikipedia.beta.wmflabs.org/w/load.php?lang=en&modules=ext.ipInfo.preferences%7Cjquery%2Coojs-ui-core%2Coojs-ui-widgets&skin=vector&version=c00l7

QA steps

Event Timeline

ARamirez_WMF renamed this task from Review all Resource Loader module definitions for case-sensitivity issues to Review all Resource Loader module definitions for case-sensitivity issues [4H].Nov 10 2021, 5:12 PM

Change 747115 had a related patch set uploaded (by Wikitrent; author: Wikitrent):

[mediawiki/extensions/IPInfo@master] Fix misnamed directory name in ipInfo/modules

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

Change 747115 merged by jenkins-bot:

[mediawiki/extensions/IPInfo@master] Fix misnamed directory name in ipInfo/modules

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

phuedx updated the task description. (Show Details)
phuedx updated the task description. (Show Details)

Searched the page url with the error and it is no longer showing, see screen shot:

Screen Shot 2021-12-21 at 11.54.55 AM.png (718×2 px, 511 KB)

I also confirm that the IP permission check box works as expected on the user permissions page.

@phuedx Question: The test url when loaded still shows error and does not load the page. Is that expected?
https://en.wikipedia.beta.wmflabs.org/w/load.php?lang=en&modules=ext.ipInfo.preferences%7Cjquery%2Coojs-ui-core%2Coojs-ui-widgets&skin=vector&version=c00l7

I also confirm that the IP permission check box works as expected on the user permissions page.

@phuedx Question: The test url when loaded still shows error and does not load the page. Is that expected?
https://en.wikipedia.beta.wmflabs.org/w/load.php?lang=en&modules=ext.ipInfo.preferences%7Cjquery%2Coojs-ui-core%2Coojs-ui-widgets&skin=vector&version=c00l7

That URL isn't expected to be functional like the Special:Preferences page, for example. The expected response for that URL is a bunch of JavaScript and CSS in plaintext. If there were an error in any of those, then the part of the Special:Preferences that you tested wouldn't work so I think it's fair to move this to Done: Q2 2021-22.