Page MenuHomePhabricator

Kartographer: PHP Notice: Undefined property: stdClass::$type
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error
normalized_message
[{reqId}] {exception_url}   PHP Notice: Undefined property: stdClass::$type
exception.trace
from /srv/mediawiki/php-1.39.0-wmf.4/extensions/Kartographer/includes/SimpleStyleParser.php(213)
#0 /srv/mediawiki/php-1.39.0-wmf.4/extensions/Kartographer/includes/SimpleStyleParser.php(213): MWExceptionHandler::handleError(integer, string, string, integer, array)
#1 /srv/mediawiki/php-1.39.0-wmf.4/extensions/Kartographer/includes/SimpleStyleParser.php(211): Kartographer\SimpleStyleParser->normalize(stdClass)
#2 /srv/mediawiki/php-1.39.0-wmf.4/extensions/Kartographer/includes/SimpleStyleParser.php(96): Kartographer\SimpleStyleParser->normalize(array)
#3 /srv/mediawiki/php-1.39.0-wmf.4/extensions/JsonConfig/includes/JCMapDataContent.php(53): Kartographer\SimpleStyleParser->normalizeAndSanitize(array)
#4 /srv/mediawiki/php-1.39.0-wmf.4/extensions/JsonConfig/includes/JCDataApi.php(33): JsonConfig\JCMapDataContent->getSafeData(stdClass)
#5 /srv/mediawiki/php-1.39.0-wmf.4/includes/api/ApiMain.php(1897): JsonConfig\JCDataApi->execute()
#6 /srv/mediawiki/php-1.39.0-wmf.4/includes/api/ApiMain.php(871): ApiMain->executeAction()
#7 /srv/mediawiki/php-1.39.0-wmf.4/includes/api/ApiMain.php(842): ApiMain->executeActionWithErrorHandling()
#8 /srv/mediawiki/php-1.39.0-wmf.4/api.php(90): ApiMain->execute()
#9 /srv/mediawiki/php-1.39.0-wmf.4/api.php(45): wfApiMain()
#10 /srv/mediawiki/w/api.php(3): require(string)
#11 {main}
Impact
Notes

3 of these in 1.39.0-wmf.4 (T300203).

Event Timeline

awight subscribed.

This is related to some cleanup we did. We'll fix and include a test.

Reopening, this is subtly a different bug.

Change 773745 had a related patch set uploaded (by Awight; author: Awight):

[mediawiki/extensions/JsonConfig@master] [WIP] Fix handling of null value

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

I discovered here that the JsonConfig code is lacking a validation step, there are some FIXMEs in the code about it. The reason is that when geojson is loaded through the JsonConfig mechanism, for example a ".map" in the Data namespace, then each marker can have a localized title and description. This breaks our json schema, so we skip validation until doing the final parse. There is some tech debt to clean up, we should reconsider the workflow and which code should have responsibility for handling the localized strings.

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

[mediawiki/extensions/Kartographer@master] Make SimpleStyleParser a little more robust

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

Change 774493 merged by jenkins-bot:

[mediawiki/extensions/Kartographer@master] Make SimpleStyleParser a little more robust

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

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

[mediawiki/extensions/Kartographer@master] Improve test coverage and stability of SimpleStyleParser

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

Change 774878 merged by jenkins-bot:

[mediawiki/extensions/Kartographer@master] Improve test coverage and stability of SimpleStyleParser

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

Change 773745 abandoned by Thiemo Kreuz (WMDE):

[mediawiki/extensions/JsonConfig@master] [WIP] Fix handling of null value

Reason:

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

The cluster is on wmf.6 now. I might have done that wrong, but I can't find this error anywhere on https://logstash.wikimedia.org, except for 5 occurrences on March 24. I think it's safe to call this done after 2 weeks of silence.

thiemowmde claimed this task.