goiblas / Map-Block-Leaflet

Map Block Leaflet for WordPress 🗺️
https://wordpress.org/plugins/map-block-leaflet
GNU General Public License v2.0
17 stars 10 forks source link

Map Block Leaflet 1.5 doesn't load. #21

Closed daviewales closed 5 years ago

daviewales commented 5 years ago

After upgrading to version 1.5, Wordpress seems unable to detect this plugin.

Specifically, the plugin appears to be installed and activated, but I am unable to find it in the list of blocks. Blocks added with a previous version of the plugin no longer work.

goiblas commented 5 years ago

The way of loading the assets has changed only load when there is a map in the content. I've tried it in the latest version, what WordPress versiondo you use?

daviewales commented 5 years ago

I'm running WordPress 5.2.2 and PHP 7.2.13.

daviewales commented 5 years ago

OK. I'm not quite sure what's happened here. It's mysteriously started working again. I'll close this for now, but I'll report back with more details if it stops working again.

daviewales commented 5 years ago

OK. I've found something that causes this issue.

When I have another mapping plugin installed, such as "MapPress Maps for WordPress", this plugin works fine.

When I remove the other plugin, I get errors such as the following in this plugin:

The resource from “https://unpkg.com/leaflet@1.5.1/dist/leaflet.css?ver=1.5.1” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff).
goiblas commented 5 years ago

I will include the files of the library maps in the plugin to avoid being blocked

daviewales commented 5 years ago

Thanks!