Hey,
When using the Maps extension together with MediaWiki 1.34 or later the markers on Leaflet maps do not show correctly.
Example: https://user-images.githubusercontent.com/146040/78082503-7b1c1680-73b3-11ea...
Issue tread: https://github.com/JeroenDeDauw/Maps/issues/607
They show fine on older versions of MediaWiki. Though only if Maps loads the leaflet.css file by stuffing an Html::linkedStyle() into the header on top of using the Resouce Loader. Without that hack the bug also shows up on older MediaWiki versions.
As you can deduce from that hack working, Resouce Loader is somehow involved. This can be confirmed by setting $wgResourceLoaderDebug to true, which causes the bug to disappear. I tracked this down a bit and found that this modification "fixes" the bug as well: https://github.com/JeroenDeDauw/MediaWiki/commit/1713ccde9de7d59634b1a134c58...
Without knowing how the Leaflet library is being broken or knowing Resource Loader internals, this is rather hard to track down further. Any help is much appreciated.
Some relevant code:
* Resource loader module definition: https://github.com/JeroenDeDauw/Maps/blob/master/extension.json#L111 * leaflet.css: https://github.com/JeroenDeDauw/Maps/blob/master/resources/lib/leaflet/leafl...
Cheers
-- Jeroen De Dauw | www.EntropyWins.wtf https://EntropyWins.wtf Professional wiki hosting and services: www.Professional.Wiki https://Professional.Wiki Entrepreneur | Software Crafter | Open Source | Wikimedia | Speaker ~=[,,_,,]:3
I tracked it down a bit, using the URLs https://www.semantic-mediawiki.org/wiki/Help:Leaflet_format vs. https://www.semantic-mediawiki.org/wiki/Help:Leaflet_format?debug=1
These weird "shadow" pointers are indeed shadows. The bug happens on the "leaflet-shadow-pane" layer. The individual "leaflet-marker-shadow" <img> elements on this layer are supposed to show the image "marker-shadow.png", but for some reason show the image "marker-icon.png" instead. This happens in the actual src="…" argument of the <img> tag, not in CSS.
There is really something broken there:
src="…/marker-icon.png?2273e")marker-shadow.png"
I was not yet able to track it down further.
The code your demo https://github.com/JeroenDeDauw/MediaWiki/commit/1713ccde9de7d59634b1a134c58... happens to touch does not look like it should affect HTML, but only CSS. I was not able to find any code in ResourceLoader that messes with <img> tags or src="…" arguments.
Best Thiemo
Hey Jeroen, thanks for raising it. Can you fill a phab task for that? I think that's a better way to make it visible.
On Wed, Apr 1, 2020 at 1:09 AM Jeroen De Dauw jeroendedauw@gmail.com wrote:
Hey,
When using the Maps extension together with MediaWiki 1.34 or later the markers on Leaflet maps do not show correctly.
Example:
https://user-images.githubusercontent.com/146040/78082503-7b1c1680-73b3-11ea...
Issue tread: https://github.com/JeroenDeDauw/Maps/issues/607
They show fine on older versions of MediaWiki. Though only if Maps loads the leaflet.css file by stuffing an Html::linkedStyle() into the header on top of using the Resouce Loader. Without that hack the bug also shows up on older MediaWiki versions.
As you can deduce from that hack working, Resouce Loader is somehow involved. This can be confirmed by setting $wgResourceLoaderDebug to true, which causes the bug to disappear. I tracked this down a bit and found that this modification "fixes" the bug as well:
https://github.com/JeroenDeDauw/MediaWiki/commit/1713ccde9de7d59634b1a134c58...
Without knowing how the Leaflet library is being broken or knowing Resource Loader internals, this is rather hard to track down further. Any help is much appreciated.
Some relevant code:
- Resource loader module definition:
https://github.com/JeroenDeDauw/Maps/blob/master/extension.json#L111
- leaflet.css:
https://github.com/JeroenDeDauw/Maps/blob/master/resources/lib/leaflet/leafl...
Cheers
-- Jeroen De Dauw | www.EntropyWins.wtf https://EntropyWins.wtf Professional wiki hosting and services: www.Professional.Wiki https://Professional.Wiki Entrepreneur | Software Crafter | Open Source | Wikimedia | Speaker ~=[,,_,,]:3 _______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
This is because you have not initialized the imagePath of leaflet markers. Because of that it falls back to detectIconPath(), which isn't smart enough to handle the myriad of forms of background image css that are possible with post processing systems these days.
This issue is also known in Leaflet: https://github.com/Leaflet/Leaflet/issues/4968 https://github.com/Leaflet/Leaflet/issues/4968
DJ
On 1 Apr 2020, at 01:08, Jeroen De Dauw jeroendedauw@gmail.com wrote:
Hey,
When using the Maps extension together with MediaWiki 1.34 or later the markers on Leaflet maps do not show correctly.
Example: https://user-images.githubusercontent.com/146040/78082503-7b1c1680-73b3-11ea...
Issue tread: https://github.com/JeroenDeDauw/Maps/issues/607
They show fine on older versions of MediaWiki. Though only if Maps loads the leaflet.css file by stuffing an Html::linkedStyle() into the header on top of using the Resouce Loader. Without that hack the bug also shows up on older MediaWiki versions.
As you can deduce from that hack working, Resouce Loader is somehow involved. This can be confirmed by setting $wgResourceLoaderDebug to true, which causes the bug to disappear. I tracked this down a bit and found that this modification "fixes" the bug as well: https://github.com/JeroenDeDauw/MediaWiki/commit/1713ccde9de7d59634b1a134c58...
Without knowing how the Leaflet library is being broken or knowing Resource Loader internals, this is rather hard to track down further. Any help is much appreciated.
Some relevant code:
- Resource loader module definition:
https://github.com/JeroenDeDauw/Maps/blob/master/extension.json#L111
- leaflet.css:
https://github.com/JeroenDeDauw/Maps/blob/master/resources/lib/leaflet/leafl...
Cheers
-- Jeroen De Dauw | www.EntropyWins.wtf https://EntropyWins.wtf Professional wiki hosting and services: www.Professional.Wiki https://Professional.Wiki Entrepreneur | Software Crafter | Open Source | Wikimedia | Speaker ~=[,,_,,]:3 _______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
wikitech-l@lists.wikimedia.org