problems with the Leaflet plug -in
Paul Hebert wrote:
"I'm writing this message in response to a tweet we received to the Commons Twitter account. I responded that I'd make sure her message got to our support staff and she also sent a tweet to LeafletJS (the plug-in seems to be from them)
Michelle Zimmer is having a problem with the plugin she's using for the map on her Brewery page. When I browse it, her markers are there (she reports the same) but the map tiles don't load and produce an error. Oddly, when I zoom in or out the tiles briefly show before the error pops up again.
I wrote to her asking for more info. She replied:
"Yeah, it is odd. Also, when I expand the individual markers, the map loads without an error.
Yes, it is the Leaflet plug -in."
#1 Updated by Matt Gold almost 4 years ago
- Category name set to WordPress Plugins
- Status changed from New to Assigned
- Assignee set to Boone Gorges
FYI -- you can find more info about the issue the user is having here -- https://commons.gc.cuny.edu/groups/gis-working-group/forum/topic/leaflet-map-suddenly-not-loading/
#2 Updated by Boone Gorges almost 4 years ago
- Target version set to 1.12.8
There are two problems.
One is that the plugin doesn't properly try to load HTTPS assets. So the browser prevents them from being loaded. See https://wordpress.org/support/topic/map-tiles-still-loaded-via-http-instead-of-https/.
The other is that the API providers appear to have changed their endpoint URLs, and they haven't been updated in the plugin. See https://wordpress.org/support/topic/discomap-api-endpoints-have-changed/. I've made the manual change on the brewingbronx site, and it appears that maps are loading properly.
I'll have to do something more general to fix the problem across the Commons, until the plugin author fixes it in the plugin. Depending on the upstream fix, a local fix may be necessary even after an update. I'll try to do this for the next Commons release.
#4 Updated by Boone Gorges almost 4 years ago
To be clear, the specific page I was given should already be fixed. https://brewingbronx.commons.gc.cuny.edu/german-brewers/
If there are more maps that aren't working, give me the URLs and I can fix them directly.
#5 Updated by Matt Gold almost 4 years ago
aha!! that's great. thanks. Marilyn, can you also say that I requested that Michelle add to the thread she started in the GIS group but that anyone else facing this problem should let us know, as the larger issue with the plugin won't be fixed until our Feb 13 update?
#6 Updated by Boone Gorges almost 4 years ago
- Status changed from Assigned to Resolved
I've put a fix in place that should work for all Commons sites. https://github.com/cuny-academic-commons/cac/commit/1018c30ebfbdfbf59ff81c35e828bc594421667e