Page MenuHomePhabricator

[Vega Err] PARSE DATA FAILED: countries TypeError: t.objects is undefined
Open, Needs TriagePublic

Description

I run a test wiki at http://tools.wikimedia.pl/~saper/b/index.php running:

MediaWiki git master (https://phabricator.wikimedia.org/r/revision/mediawiki/core.git;d9b2cdabdc0a11344158d81ee45a91675a51e945)
Extension:Graphs (3af5fe8) + 2 patches (see below)

I have copied https://www.mediawiki.org/wiki/Extension:Graph/Demo/HistoricalFertilityRates example to the wiki and adjusted data source paths to wikiraw:///Fertility-csv and wikiraw:///WorldMap-iso3-json respectively.
Both data files have been copied from the mediawiki.org to the respective shortened names
http://tools.wikimedia.pl/~saper/b/index.php?title=Fertility-csv and http://tools.wikimedia.pl/~saper/b/index.php?title=WorldMap-iso3-json

(setup is the same as for T145944).

To workaround T145944 I have applied

Two patches applied:

I am getting errors on the console, since the extension is trying to parse country data:

`
Object { batchcomplete: true, query: Object } vega.js:3269:1
Object { batchcomplete: true, query: Object } vega.js:3270:1
"[Vega Err]" "PARSE DATA FAILED: countries TypeError: t.objects is undefined" vega.js:10714:2

"[Vega Err]" TypeError: t.objects is undefined
Stack trace:
[20]</reader@http://tools.wikimedia.pl/~saper/b/extensions/Graph/lib/vega2/vega.js?235e1:3271:1
read@http://tools.wikimedia.pl/~saper/b/extensions/Graph/lib/vega2/vega.js?235e1:3515:1
onLoad/<@http://tools.wikimedia.pl/~saper/b/extensions/Graph/lib/vega2/vega.js?235e1:15246:37
dataParser@http://tools.wikimedia.pl/~saper/b/extensions/Graph/lib/graph2.compiled.js?c3ebd:552:5
VegaWrapper/datalib.load.loader/cb@http://tools.wikimedia.pl/~saper/b/extensions/Graph/lib/graph2.compiled.js?c3ebd:245:20
respond@http://tools.wikimedia.pl/~saper/b/extensions/Graph/lib/vega2/vega.js?235e1:3432:7
 vega.js:10714:2

TypeError: t.objects is undefined
Stack trace:
[20]</reader@http://tools.wikimedia.pl/~saper/b/extensions/Graph/lib/vega2/vega.js?235e1:3271:1
read@http://tools.wikimedia.pl/~saper/b/extensions/Graph/lib/vega2/vega.js?235e1:3515:1
onLoad/<@http://tools.wikimedia.pl/~saper/b/extensions/Graph/lib/vega2/vega.js?235e1:15246:37
dataParser@http://tools.wikimedia.pl/~saper/b/extensions/Graph/lib/graph2.compiled.js?c3ebd:552:5
VegaWrapper/datalib.load.loader/cb@http://tools.wikimedia.pl/~saper/b/extensions/Graph/lib/graph2.compiled.js?c3ebd:245:20
respond@http://tools.wikimedia.pl/~saper/b/extensions/Graph/lib/vega2/vega.js?235e1:3432:7
 graph2.compiled.js:95:6
`

Event Timeline

saper created this task.Sep 17 2016, 11:56 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 17 2016, 11:56 PM

I have downloaded the JSON world data using

http://tools.wikimedia.pl/~saper/b/index.php/WorldMap-iso3-json?action=raw

and "jq" is parsing them fine, so the JSON format is correct.

saper updated the task description. (Show Details)Sep 18 2016, 12:04 AM