hupe13 / extensions-leaflet-map-github

WordPress Plugin Extensions for Leaflet Map - Github Version
GNU General Public License v2.0
13 stars 2 forks source link

MarkerClusterGroup stopped working for every versions after 3.2.2 #4

Closed Write closed 1 year ago

Write commented 1 year ago

Rollback to version 3.2.2 make them work again just fine. Installing >= 3.3 throw an error in console :

Uncaught SyntaxError: '#' not followed by identifier [a-proximite:4023:595]

even if there's no marker present, and there's only the markerClusterGroup present, it's not a syntax issue on my end. Installing v3.2.2 make it work again instantly, and the Uncaught SyntaxError is no more.

hupe13 commented 1 year ago

Do you have an example page? Which shortcode you are using?

Write commented 1 year ago

Do you have an example page? Which shortcode you are using?

Well for example this :


[leaflet-map mapid="Standard" height=612 lat=46.61798 lng=5.97228 zoom=13 layerswitch !fitbounds fullscreen dragging scrollwheel]
[leaflet-marker background="none" lat=46.61798 lng=5.97228 visible iconUrl="/wp-content/misc/marker.png" iconanchor="10,10" popupanchor="0,-10" iconsize="20,20"]<div class="leaflet-txtbox"><strong>Notre gîte</strong><br>33 Le Rochat<br>39150 Fort-du-Plasne<br><a target="_blank" href="https://www.google.fr/maps/dir//33+Le+Rochat,+39150+Fort-du-Plasne/@46.6157885,5.945032,12.77z/data=!4m17!1m7!3m6!1s0x478cfc44e91f9b4f:0x50be7b7fa430ec3e!2s33+Le+Rochat,+39150+Fort-du-Plasne!3b1!8m2!3d46.6180777!4d5.9722465!4m8!1m0!1m5!1m1!1s0x478cfc44e91f9b4f:0x50be7b7fa430ec3e!2m2!1d5.9722465!2d46.6180777!3e2" rel="noopener">Voir sur Google Maps</a></div>[/leaflet-marker]

[leaflet-marker lat=46.55765 lng=6.01524900 iconUrl="/wp-content/misc/marker_activity_green.png" iconanchor="10,70" popupanchor="5,-60" ]<span class="leaflet-popupdata"><img src="https://www.jura-tourism.com/wp-content/uploads/wpetourisme/321000920-18-270x220.jpg" alt="" width="100%"><span class="leaflet-txtbox"><strong>Balland skis</strong><br><a href="https://www.jura-tourism.com/activite/balland-skis/" target="_blank" rel="noopener">Voir sur Jura-Tourism</a></span></span>[/leaflet-marker]

[markerClusterGroup feat="iconUrl" strings="yellow,green,red" groups="À Visiter,Activités,Restaurants" visible="1,0,0"]
[gestures]
[layerswitch]
[zoomhomemap]

I removed extra markers but the error is thrown too without any marker anyway. The groups menu won't show up.

The origin page is https://colombe-du-rochat.fr/lieu-et-activites/ but it work now since I'm using 3.2.2 again.

hupe13 commented 1 year ago

Have you set disableClusteringAtZoom to 0 in the settings in https://your-domain.tld/wp-admin/admin.php?page=extensions-leaflet-map&tab=markercluster ? This is a bug. I will fix it. To get Clustering work until then, please set this value not 0.

Write commented 1 year ago

Have you set disableClusteringAtZoom to 0 in the settings in https://your-domain.tld/wp-admin/admin.php?page=extensions-leaflet-map&tab=markercluster ? This is a bug. I will fix it. To get Clustering work until then, please set this value not 0.

Indeed, I had it set to 0. I just upgraded the plugin to 3.3.3 again and set it to 6, issue still arise as you can see here :

https://colombe-du-rochat.fr/lieu-et-activites/

Error shown in firefox : Uncaught SyntaxError: '#' not followed by identifier Error shown in Chrome : Uncaught SyntaxError: Invalid or unexpected token

Write commented 1 year ago

I've rollbacked to 3.2.2, hope you had time to see the issue.

hupe13 commented 1 year ago

I had time, but I got a server error 503.

Write commented 1 year ago

oh yeah sorry --'

Write commented 1 year ago

Wait a sec, I fix that and rollback again

Write commented 1 year ago

here it is, installed back 3.3.3, and set disableClusteringAtZoom to 6. Thanks again and sorry.

hupe13 commented 1 year ago

https://github.com/hupe13/extensions-leaflet-map-github/blob/7960fbc5ab2fb2c6594d447d3ce3da2c7926ecec/js/featuregroup.js#L54

For some reason the "&&" are converted to "&#038;&#038;. I have no idea. But there is hope. Why does this only happen to you? (or the others do not complain ;-) ) I will try it to solve.

Write commented 1 year ago

Maybe an issue with my nginx ? o.o No idea; Why does it not happen in v3.2.2 ?

hupe13 commented 1 year ago

3.2.2 or 3.3.2?

Write commented 1 year ago

Well it does not happen in 3.2.2. Every version after that it throw this error.

Write commented 1 year ago

So basically it's just about setting Githubissues.

  • Githubissues is a development platform for aggregating issues.