Page MenuHomePhabricator

Maplink ignores zoom=, latitude= and longitude= parameters when no POIs are listed on the page
Closed, ResolvedPublic

Description

A very strange bug appeared recently. When there are no POIs listed on the page, the #maplink tag misbehaves and fails to use the latitude=, longitude=, and zoom= parameters. For example:

https://ru.wikivoyage.org/wiki/Литва

click on the map icon in the top right corner, and you will see the world map instead of the map zoomed on Lithuania. On the other hand, #mapframe, which is called by the same {{geo}} template, opens the correct map when one clicks on "Открыть карту"

Now go to the page:

https://ru.wikivoyage.org/wiki/Аукштайтия

Its only difference is that a few POIs are specified on this page. In this case, the click on the map icon in the top right corner of the page opens the correct map.

Details

Related Gerrit Patches:
mediawiki/extensions/Kartographer : wmf/1.28.0-wmf.15Fix maplink not reading zoom/lat/lon when no POIs
mediawiki/extensions/Kartographer : wmf/1.28.0-wmf.14Fix maplink not reading zoom/lat/lon when no POIs
mediawiki/extensions/Kartographer : masterFix maplink not reading zoom/lat/lon when no POIs

Event Timeline

Atsirlin created this task.Aug 12 2016, 1:09 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 12 2016, 1:09 AM

I can give some further information related to this bug. Apparently, Karographer has some problem when reading a page with multiple maplink commands. What we do is the following:

  1. First, call a map from the {{geo}} template. This is done via the {{#tag:maplink command
  1. Then, specify individual POIs using the {{marker}}/{{listing}} template that, in turn, relies on Module:Map and does no call {{#tag:maplink directly

The first map from {{geo}} fails to use its own lat=, long= and zoom= parameters and takes parameters from the {{marker}} template instead. When neither {{marker}} nor {{listing}} are present on the page, some weird default values are used.

Again, it is highly desirable to solve this problem ASAP, because it affects all pages on Russian Wikivoyage.

Change 305061 had a related patch set uploaded (by JGirault):
Fix maplink not reading zoom/lat/lon when no POIs

https://gerrit.wikimedia.org/r/305061

Change 305061 merged by jenkins-bot:
Fix maplink not reading zoom/lat/lon when no POIs

https://gerrit.wikimedia.org/r/305061

Change 305079 had a related patch set uploaded (by MaxSem):
Fix maplink not reading zoom/lat/lon when no POIs

https://gerrit.wikimedia.org/r/305079

Change 305080 had a related patch set uploaded (by MaxSem):
Fix maplink not reading zoom/lat/lon when no POIs

https://gerrit.wikimedia.org/r/305080

Change 305080 merged by jenkins-bot:
Fix maplink not reading zoom/lat/lon when no POIs

https://gerrit.wikimedia.org/r/305080

Change 305079 merged by jenkins-bot:
Fix maplink not reading zoom/lat/lon when no POIs

https://gerrit.wikimedia.org/r/305079

JGirault closed this task as Resolved.Aug 26 2016, 3:41 PM
JGirault claimed this task.
JGirault added a project: Maps-Sprint.
Yurik added a project: Maps.Sep 4 2016, 4:19 AM
Restricted Application added a project: Discovery. · View Herald TranscriptSep 4 2016, 4:19 AM