Page MenuHomePhabricator

geohack does not show OSM map in box any more depending on language parameter
Closed, ResolvedPublic

Event Timeline

Thanks. If this is an issue with geohack itself then it would be better to report this to https://bitbucket.org/magnusmanske/geohack where the geohack maintainer would see this report (as listed on https://tools.wmflabs.org/admin/tools )

see https://de.wikipedia.org/wiki/Vorlage_Diskussion:GeoTemplate#probleme_mit_Geohack
it seems that there is a problem at the parameter passing interface

replacing MediaWiki:GeoHack.js with the English version did not help

The reason of this problem is that { } within HTML attributes is escaped when a page is retrieved from de.wikipedia.org. E.g. when [[:de:Vorlage:GeoTemplate]] contains this code ...

<div style="position:absolute; bottom:{latdegint}px; left:{londegint}px;" title="{title}">

Then https://de.wikipedia.org/wiki/Vorlage:GeoTemplate produces this HTML output:

<div style="position:absolute; bottom:&#123;latdegint&#125;px; left:&#123;londegint&#125;px;" title="&#123;title&#125;">

This breaks Geohack. This is a new problem which was introduced with some mediawiki update recently.

...

This breaks Geohack. This is a new problem which was introduced with some mediawiki update recently.

As it does not break similar code on WP:en and both WP:de and WP:en have been upgraded to same mediawiki version on the 7th of Dec., I suspect the difference in versions of MariaDB to be a possible cause (10.0.32-MariaDB/10.0.28-MariaDB in WP:en, 10.0.33-MariaDB in WP:de).

I have now tested the English template code from [[:en:Template:GeoTemplate]] at de.wikipedia.org. It produces the same escaping here as the German template. So this definitely is an installation-dependent issue.

The problem has been solved today by implementing a workaround in Geohack.

Thgoiter claimed this task.