Page MenuHomePhabricator

PHP Notice: Undefined index: wgKartographerLiveData
Closed, ResolvedPublicPRODUCTION ERROR



MediaWiki version: 1.35.0-wmf.23

PHP Notice: Undefined index: wgKartographerLiveData


~6 of these since rolling 1.35.0-wmf.23 to group1 (T233871). Impact unclear. Doesn't appear to result in a user-facing error.

Maybe similar to T223085?


Request ID
Request URL
Stack Trace
#0 /srv/mediawiki/php-1.35.0-wmf.23/extensions/Wikibase/lib/includes/Formatters/CachingKartographerEmbeddingHandler.php(88): MWExceptionHandler::handleError(integer, string, string, integer, array)
#1 /srv/mediawiki/php-1.35.0-wmf.23/extensions/Wikibase/lib/includes/Formatters/GlobeCoordinateKartographerFormatter.php(78): Wikibase\Lib\Formatters\CachingKartographerEmbeddingHandler->getPreviewHtml(DataValues\Geo\Values\GlobeCoordinateValue, LanguageEn)
#2 /srv/mediawiki/php-1.35.0-wmf.23/extensions/Wikibase/lib/includes/Formatters/DispatchingValueFormatter.php(75): Wikibase\Lib\Formatters\GlobeCoordinateKartographerFormatter->format(DataValues\Geo\Values\GlobeCoordinateValue)
#3 /srv/mediawiki/php-1.35.0-wmf.23/extensions/Wikibase/lib/includes/Formatters/PropertyValueSnakFormatter.php(148): Wikibase\Lib\Formatters\DispatchingValueFormatter->formatValue(DataValues\Geo\Values\GlobeCoordinateValue, string)
#4 /srv/mediawiki/php-1.35.0-wmf.23/extensions/Wikibase/lib/includes/Formatters/PropertyValueSnakFormatter.php(117): Wikibase\Lib\Formatters\PropertyValueSnakFormatter->formatValue(DataValues\Geo\Values\GlobeCoordinateValue, string)
#5 /srv/mediawiki/php-1.35.0-wmf.23/extensions/Wikibase/lib/includes/Formatters/DispatchingSnakFormatter.php(151): Wikibase\Lib\Formatters\PropertyValueSnakFormatter->formatSnak(Wikibase\DataModel\Snak\PropertyValueSnak)
#6 /srv/mediawiki/php-1.35.0-wmf.23/extensions/Wikibase/lib/includes/Formatters/ErrorHandlingSnakFormatter.php(67): Wikibase\Lib\Formatters\DispatchingSnakFormatter->formatSnak(Wikibase\DataModel\Snak\PropertyValueSnak)
#7 /srv/mediawiki/php-1.35.0-wmf.23/extensions/Wikibase/repo/includes/Api/FormatSnakValue.php(115): Wikibase\Lib\Formatters\ErrorHandlingSnakFormatter->formatSnak(Wikibase\DataModel\Snak\PropertyValueSnak)
#8 /srv/mediawiki/php-1.35.0-wmf.23/extensions/Wikibase/repo/includes/Api/FormatSnakValue.php(92): Wikibase\Repo\Api\FormatSnakValue->formatValue(array, DataValues\Geo\Values\GlobeCoordinateValue, NULL)
#9 /srv/mediawiki/php-1.35.0-wmf.23/includes/api/ApiMain.php(1590): Wikibase\Repo\Api\FormatSnakValue->execute()
#10 /srv/mediawiki/php-1.35.0-wmf.23/includes/api/ApiMain.php(522): ApiMain->executeAction()
#11 /srv/mediawiki/php-1.35.0-wmf.23/includes/api/ApiMain.php(493): ApiMain->executeActionWithErrorHandling()
#12 /srv/mediawiki/php-1.35.0-wmf.23/api.php(84): ApiMain->execute()
#13 /srv/mediawiki/w/api.php(3): require(string)
#14 {main}

Event Timeline

Krinkle added a subscriber: Krinkle.

Undefined variables seem quite serious, especially wg-config variables. Blocker imho.

I do not know the involved CachingKartographerEmbeddingHandler class in Wikibase very well. But according to what I see in I suspect that:

  1. I believe this is not a serious issue. Just a notice. The missing variable is cast to an empty array. From there, I believe all following code is fine with an empty array.
  2. The root cause appears to be a mismatch between the code in the Kartographer extension where the variable is created, and the code in Wikibase that consumes it. Note that the variable is only created under specific circumstances, but Wikibase always expects it.

Just a few lines below in the same class is a check that creates the variable in case it is missing. But this line is in JavaScript. It appears like the same check needs to be done in PHP.

I haven't managed to find any documentation about wgKartographerLiveData anywhere, but as best I can tell from the Kartographer codebase, it's not safe to assume it will be defined. It looks like @hoo originally wrote this code, so maybe he can provide some insight.

brennen triaged this task as Unbreak Now! priority.Mar 12 2020, 6:03 PM

Setting as UBN as long as this is marked a train blocker. Sounds like it's not serious in terms of real impact but it would be nice to eliminate logspam.

brennen lowered the priority of this task from Unbreak Now! to Medium.Mar 12 2020, 7:02 PM

Per conversation in RelEng and input here, this doesn't seem severe enough to hold up the train (particularly over the weekend).

wgKartographerLiveData has to do with previewing maps. T145615: Preview with <maplink> does not work explains that it could not query the server because since the entry was not saved yet, the maps service (i presume geoshape, geoline service etc) did not have the result available yet for rendering.

Change 579525 had a related patch set uploaded (by Thiemo Kreuz (WMDE); owner: Thiemo Kreuz (WMDE)):
[mediawiki/extensions/Wikibase@master] Do not assume wgKartographerLiveData is always set

Change 579525 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Do not assume wgKartographerLiveData is always set

Change 580112 had a related patch set uploaded (by Krinkle; owner: Thiemo Kreuz (WMDE)):
[mediawiki/extensions/Wikibase@wmf/1.35.0-wmf.23] Do not assume wgKartographerLiveData is always set

Change 580112 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@wmf/1.35.0-wmf.23] Do not assume wgKartographerLiveData is always set

Mentioned in SAL (#wikimedia-operations) [2020-03-17T00:57:15Z] <krinkle@deploy1001> Synchronized php-1.35.0-wmf.23/extensions/Wikibase/lib/includes/Formatters/: Ic77b2c6b33a, T247458 (duration: 01m 12s)

Krinkle claimed this task.