The Chinese Wikivoyage mobile version does not display the map properly.
Ios and android are the same problem.
Sample-
http://zh.wikivoyage.org/wiki/竹北
Yuriy_kosygin | |
Dec 6 2018, 11:32 AM |
F27519892: Screenshot_20181213-003608.jpg | |
Dec 12 2018, 4:38 PM |
F27501002: Screen Shot 2018-12-11 at 3.07.38 PM.png | |
Dec 11 2018, 9:17 PM |
F27406585: Screenshot_20181207-025056.jpg | |
Dec 6 2018, 6:53 PM |
F27401783: Screenshot_20181206-191611.jpg | |
Dec 6 2018, 11:32 AM |
The Chinese Wikivoyage mobile version does not display the map properly.
Ios and android are the same problem.
Sample-
http://zh.wikivoyage.org/wiki/竹北
I can't see any backend errors and it looks like the pieces are all being loaded (scroll down to see them, out of place) but something is broken in the frontend JS.
@zhuyifei1999 Can you follow this problem? By the way, the Menu function does not click or use it.
This is probably some sort of race condition. https://zh.m.wikivoyage.org/wiki/%E7%AB%B9%E5%8C%97?debug=1 Loads fine for me,
I spent a good chunk of time on Friday and over the weekend attempting to reproduce this in MW-Vagrant, but could not; the dynamic map content loads and displays as expected. There must be some quirk in the Wikimedia production environment causing this. If anyone does manage to reproduce this locally, please add some steps in the description and I'll be very grateful!
This also works in safemode – https://zh.m.wikivoyage.org/wiki/%E7%AB%B9%E5%8C%97?safemode=1 – so it's probably a site script/default gadget that's broken.
I tried disabling all gadgets, still reproduceable.
Are MediaWiki.Common.js / MediaWiki.Common.css loaded for mobile version? Those are huge.
Are MediaWiki.Common.js / MediaWiki.Common.css loaded for mobile version? Those are huge.
No just mobile.js and mobile.css (also check Minerva.js and Minerva.css)
https://zh.m.wikivoyage.org/w/index.php?title=MediaWiki:Mobile.css&action=edit looks like invalid CSS to me. It's missing a closing brace (}) at the end.
That might have just fixed it. Thanks @Jdlrobson for the finding and @Jdforrester-WMF for the fix :)
I can still reproduce this but only when the section is initially collapsed (ie. it seems the map does not get initialized properly when it is display:none'd at page load time). Not sure if that's what the task description was talking about or a different bug.
Steps to repro:
Couldn't reproduce it on an actual phone though.
This is weird, I was able to reproduce it the first time doing that (in Firefox mobile mode), but unable to reproduce it since.
@Tgr Is this what you're seeing?
If it's the same thing I'm reproducing, the map is invalidated and redrawn to display correctly on resize. It's a different (and IMO much lower-priority) issue than the one in this ticket.
Yes, this is a known issue for dynamically sized elements that are loaded via mw.hook (which loads fragments before they are added to the page dom). There are similar problems when you put maps or timedmediahandler within collapsed templates.