Page MenuHomePhabricator

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

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptDec 7 2017, 2:18 PM

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 )

Aklapper added a subscriber: Magnus.Dec 8 2017, 4:07 PM

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

PM3 added a subscriber: PM3.Dec 12 2017, 3:36 PM

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).

PM3 added a comment.Dec 12 2017, 4:19 PM

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.

PM3 added a comment.Dec 18 2017, 9:56 AM

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

Thgoiter closed this task as Resolved.Dec 19 2017, 8:04 PM
Thgoiter claimed this task.