Page MenuHomePhabricator

PHP Warning: Config page does not exist: title=[title], query= [Called from JsonConfig\JCUtils::warn in /srv/mediawiki/php-1.40.0-wmf.10/extensions/JsonConfig/includes/JCUtils.php at line 47]
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error
normalized_message
[{reqId}] {exception_url}   PHP Warning: Config page does not exist: title=Data:India/West Bengal/Purba Bardhaman.map, query= [Called from JsonConfig\JCUtils::warn in /srv/mediawiki/php-1.40.0-wmf.10/extensions/JsonConfig/includes/JCUtils.php at line 47]
exception.trace
from /srv/mediawiki/php-1.40.0-wmf.10/includes/debug/MWDebug.php(507)
#0 [internal function]: MWExceptionHandler::handleError(integer, string, string, integer, array)
#1 /srv/mediawiki/php-1.40.0-wmf.10/includes/debug/MWDebug.php(507): trigger_error(string, integer)
#2 /srv/mediawiki/php-1.40.0-wmf.10/includes/debug/MWDebug.php(197): MWDebug::sendMessage(string, string, integer)
#3 /srv/mediawiki/php-1.40.0-wmf.10/includes/GlobalFunctions.php(822): MWDebug::warning(string, integer, integer, string)
#4 /srv/mediawiki/php-1.40.0-wmf.10/extensions/JsonConfig/includes/JCUtils.php(47): wfLogWarning(string)
#5 /srv/mediawiki/php-1.40.0-wmf.10/extensions/JsonConfig/includes/JCCache.php(243): JsonConfig\JCUtils::warn(string, array, array)
#6 /srv/mediawiki/php-1.40.0-wmf.10/extensions/JsonConfig/includes/JCCache.php(189): JsonConfig\JCCache->getPageFromApi(string, GuzzleHttpRequest, array)
#7 /srv/mediawiki/php-1.40.0-wmf.10/extensions/JsonConfig/includes/JCCache.php(65): JsonConfig\JCCache->loadRemote()
#8 /srv/mediawiki/php-1.40.0-wmf.10/extensions/JsonConfig/includes/JCSingleton.php(376): JsonConfig\JCCache->get()
#9 /srv/mediawiki/php-1.40.0-wmf.10/extensions/JsonConfig/includes/JCDataApi.php(21): JsonConfig\JCSingleton::getContent(JsonConfig\JCTitle)
#10 /srv/mediawiki/php-1.40.0-wmf.10/includes/api/ApiMain.php(1902): JsonConfig\JCDataApi->execute()
#11 /srv/mediawiki/php-1.40.0-wmf.10/includes/api/ApiMain.php(877): ApiMain->executeAction()
#12 /srv/mediawiki/php-1.40.0-wmf.10/includes/api/ApiMain.php(848): ApiMain->executeActionWithErrorHandling()
#13 /srv/mediawiki/php-1.40.0-wmf.10/api.php(90): ApiMain->execute()
#14 /srv/mediawiki/php-1.40.0-wmf.10/api.php(45): wfApiMain()
#15 /srv/mediawiki/w/api.php(3): require(string)
#16 {main}
Impact

Unclear. These do return invalidtitle errors.

Notes

These started after deployment of 1.40.0-wmf.10 (T320515) to all wikis:

2022-11-18-10:42:32.png (220×665 px, 14 KB)

1k+ since then.

Totally spitballing on the tags here.

Details

Request URL
https://en.wikipedia.org/w/api.php?action=jsondata&format=*&formatversion=*&title=*
Related Changes in Gerrit:

Event Timeline

Ah, sorry, just realized that only merged the 17th.

Change 858648 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[mediawiki/extensions/JsonConfig@master] Stop log spam about missing pages

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

Well, this .data file really does not exist. I can't find it anywhere. 😇️ This was just never logged before.

Here I fixed what I still believe was a copy-paste mistake: https://gerrit.wikimedia.org/r/c/mediawiki/extensions/JsonConfig/+/836821/3/includes/JCCache.php#242. I carefully reviewed the code back then and carefully reviewed it again today, just to be sure. The code change really did not have any effect other than fixing the previously broken logging. The missing page is going to be ignored either way by the relevant code in JCCache.

My opinion: Let's remove the log line. This was never logged before. Nobody missed the logging the past 9 years. And the current log spam makes it look like the API is commonly used to query pages without a separate check if they exist. I uploaded a patch.

Change 858648 merged by jenkins-bot:

[mediawiki/extensions/JsonConfig@master] Stop log spam about missing pages

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

brennen claimed this task.

Thanks for the careful investigation!