Page MenuHomePhabricator

Maps rendering should not depend on user variable image settings (default width)
Open, Needs TriagePublic

Description

Article: https://ro.wikipedia.org/wiki/Lista_exponatelor_din_Muzeul_Na%C8%9Bional_al_Satului_%E2%80%9EDimitrie_Gusti%E2%80%9D

The map contains over 100 markers from the list. When saving the page, only an empty preview is displayed instead of the static map I expected.

I tried reducing the number of markers, changing the map coordinates and preview size,but it did not work.

Event Timeline

Aklapper changed the task status from Open to Stalled.EditedApr 25 2021, 5:23 PM

Hi @Strainu, thanks for taking the time to report this!
Please provide browser and browser version info and check your error console (see https://www.mediawiki.org/wiki/Help:Locating_broken_scripts ), and for future reference please follow https://www.mediawiki.org/wiki/How_to_report_a_bug and include a list of steps to reproduce. Thanks.

I cannot reproduce in Chromium 90 or Firefox 88 on Linux:

Screenshot from 2021-04-25 19-19-44.png (1×1 px, 604 KB)

The group ids are different, thats the problem.... now to figure out why...

Strainu changed the task status from Stalled to Open.Apr 27 2021, 11:27 AM

That we have different data sha1s is already weird.. then either the input json is actually diffeerent... or the formatted version of the same data has differing output... Is Wikimedia going through a server upgrade cycle atm, where we have differing php and/or OS versions per chance ?

Anyway... Even if I paste the graph into a new page, then save, I see the problem. The image was rendered without the group present, even though the preview version, the live version and the img itself all refer to the same groupid (in my case, again _49ec1a521bf83404416e2f2874f3f9d8491af6a3) for
https://ro.wikipedia.org/w/index.php?title=Utilizator:TheDJ/teste&oldid=14171161

json blob: P15594

But the api mapdata request for the json only lists they key: _ee0f58c3a46265deb89a8f7b0444c4db0c6c933c
https://ro.wikipedia.org/w/api.php?action=query&format=jsonfm&prop=mapdata&titles=Utilizator%3ATheDJ%2Fteste

json blob: P15595

These should be the same but clearly are not and that primarily seems to be because the images have a differing thumbnail widths depending on the users' preferences because the images use the 'frameless' specified instead of a fixed width. I fixed that by setting fixed widths, but re-rendering the image seems to use cached values for the mapdata apirequest or some other kind of caching strategy, because i again got the same problem, even though the api id and the image's groupid were the same (and different from before, so it HAS to render a new image). I then copied the whole thing over to https://ro.wikipedia.org/wiki/Utilizator:TheDJ/teste2 and that seemed to fix the problem.

TheDJ renamed this task from Maps preview does not contain any markers to Maps rendering should not depend on user variable image settings (default width).Apr 27 2021, 3:52 PM

So this is basically another variant of T222604 and T246314

@TheDJ , thanks for the debugging. I think that if nobody will take on this bug in the near future, it should be mentioned in the documentation at least, to make sure others don't debug as much.

What I don't understand from your comment above is why it does it work for some users. Does their preferences regarting thumbnails match the ones from the server? Also an observation: slightly moving the center of the image fixes the caching problem even for existing pages.

Change 683055 had a related patch set uploaded (by TheDJ; author: TheDJ):

[mediawiki/extensions/Kartographer@master] Make sure map html is rendered with anonymous user parseroptions

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

T269984 also covers part where static map is generated and cached without JSON overlay (including markers).