Steps to replicate the issue (include links if applicable):
This issue was first observed through the REST Sandbox: https://test.wikipedia.org/wiki/Special:RestSandbox
- Open the REST Sandbox on test wiki
- Select "MediaWiki REST API (endpoints not in modules)" from the dropdown, if not already selected.
- Hit "submit"
- See 500 error (image paged)
What happens?:
- When opening the sandbox, visualizing the main MediaWiki REST API (without modules) results in a 500 error.
- Stack trace can be observed directly here: https://test.wikipedia.org/w/rest.php/specs/v0/module/-
- Error body below:
{
"message": "Error: exception of type Wikimedia\\Rdbms\\DBQueryError: Error 1146: Table 'testwiki.wikilambda_zlanguages' doesn't exist\nFunction: MediaWiki\\Extension\\WikiLambda\\ZObjectStore::fetchAllZLanguageObjects\nQuery: SELECT DISTINCT wlzlangs_zid,wlzlangs_language FROM `wikilambda_zlanguages` ORDER BY wlzlangs_zid ASC \n",
"exception": {
"id": "dd2614da-62ee-42f3-a0a1-4b9b81f03947",
"type": "Wikimedia\\Rdbms\\DBQueryError",
"file": "/srv/mediawiki/php-1.44.0-wmf.25/includes/libs/rdbms/database/Database.php",
"line": 1232,
"message": "Error 1146: Table 'testwiki.wikilambda_zlanguages' doesn't exist\nFunction: MediaWiki\\Extension\\WikiLambda\\ZObjectStore::fetchAllZLanguageObjects\nQuery: SELECT DISTINCT wlzlangs_zid,wlzlangs_language FROM `wikilambda_zlanguages` ORDER BY wlzlangs_zid ASC \n",
"code": 0,
"url": "/w/rest.php/specs/v0/module/-",
"caught_by": "other",
"backtrace": [
{
"file": "/srv/mediawiki/php-1.44.0-wmf.25/includes/libs/rdbms/database/Database.php",
"line": 1216,
"function": "getQueryException",
"class": "Wikimedia\\Rdbms\\Database",
"type": "-\u003E",
"args": [
"string",
"int",
"string",
"string"
]
},What should have happened instead?:
Wiki Lambda initiates correctly and the API specs render.
Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):
Other information (browser name/version, screenshots, etc.):
From James:
The problem specifically is that we can't (FWICT?) register the route conditionally based on an MW config flag, so we have to remember to check it ourselves in our execute method and exit, and we forgot for this one. Fix at FetchHandler: Disable on non-repo wikis (mediawiki/extensions/WikiLambda~1136775).
