Page MenuHomePhabricator

PHP Fatal exception when viewing diffs for certain .map pages on Wikimedia Commons
Closed, DuplicatePublicPRODUCTION ERROR

Description

On Commons if you click 'prev' on a revision of a .map dataset with a 'map.json' content model when the previous revision has a 'mediawiki' content model you get an Internal error like:

  • [W4ZLAQpAAD0AACzcXZsAAAAS] 2018-08-29 07:28:01: Fatal exception of type "MWException"

If possible this should succeed, or if this is too challenging a reasonable error message should be generated instead of an internal error.

Example link that produces the error:
https://commons.wikimedia.org/w/index.php?title=Data:Highway_192_in_Iowa_(3).map&diff=317407041&oldid=317406940

Interestingly if you click 'prev' on a revision of a .map dataset with a 'JSON' content model (instead of 'map.json') when the previous revision has a 'mediawiki' content model you get a successful diff. Example:
https://commons.wikimedia.org/w/index.php?title=Data:Highway_192_in_Iowa_(2).map&diff=317406375&oldid=317406229
So the internal error appears to be specific to the map.json content model.

See related error T203062: Unable to change content model to Map.Json and https://en.wikipedia.org/wiki/Template_talk:Infobox_road#Map_data_on_Commons.

Event Timeline

exception.file	       	/srv/mediawiki/php-1.32.0-wmf.18/extensions/JsonConfig/includes/JCJsonDifferenceEngine.php:27
exception.message	       	JsonConfig\JCJsonDifferenceEngine does not support diffing between WikitextContent and JsonConfig\JCMapDataContent
exception.trace
#0 /srv/mediawiki/php-1.32.0-wmf.18/includes/diff/DifferenceEngineSlotDiffRenderer.php(58): JsonConfig\JCJsonDifferenceEngine->generateContentDiffBody(WikitextContent, JsonConfig\JCMapDataContent)
#1 /srv/mediawiki/php-1.32.0-wmf.18/includes/diff/DifferenceEngine.php(1024): DifferenceEngineSlotDiffRenderer->getDiff(WikitextContent, JsonConfig\JCMapDataContent)
#2 /srv/mediawiki/php-1.32.0-wmf.18/includes/diff/DifferenceEngine.php(942): DifferenceEngine->getDiffBody()
#3 /srv/mediawiki/php-1.32.0-wmf.18/includes/diff/DifferenceEngine.php(907): DifferenceEngine->getDiff(string, string, string)
#4 /srv/mediawiki/php-1.32.0-wmf.18/includes/diff/DifferenceEngine.php(701): DifferenceEngine->showDiff(string, string, string)
#5 /srv/mediawiki/php-1.32.0-wmf.18/includes/page/Article.php(737): DifferenceEngine->showDiffPage(boolean)
#6 /srv/mediawiki/php-1.32.0-wmf.18/includes/page/Article.php(464): Article->showDiffPage()
#7 /srv/mediawiki/php-1.32.0-wmf.18/includes/actions/ViewAction.php(68): Article->view()
#8 /srv/mediawiki/php-1.32.0-wmf.18/includes/MediaWiki.php(501): ViewAction->show()
#9 /srv/mediawiki/php-1.32.0-wmf.18/includes/MediaWiki.php(294): MediaWiki->performAction(Article, Title)
#10 /srv/mediawiki/php-1.32.0-wmf.18/includes/MediaWiki.php(868): MediaWiki->performRequest()
#11 /srv/mediawiki/php-1.32.0-wmf.18/includes/MediaWiki.php(525): MediaWiki->main()
#12 /srv/mediawiki/php-1.32.0-wmf.18/index.php(42): MediaWiki->run()
#13 /srv/mediawiki/w/index.php(3): include(string)
#14 {main}
exception_id	       	W4ZLAQpAAD0AACzcXZsAAAAS
exception_url	       	/w/index.php?title=Data:Highway_192_in_Iowa_(3).map&diff=317407041&oldid=317406940
Krinkle renamed this task from Internal error / Fatal exception when 'diff' performed between two revisions of .map dataset with different content models on Commons to PHP Fatal exception when viewing diffs for certain .map pages on Wikimedia Commons.Aug 29 2018, 9:08 PM
mmodell changed the subtype of this task from "Task" to "Production Error".Aug 28 2019, 11:08 PM