bozdoz / wp-plugin-leaflet-map

Add leaflet maps to Wordpress with shortcodes
https://wordpress.org/plugins/leaflet-map/
GNU General Public License v2.0
141 stars 72 forks source link

Map is not shown #20

Closed Mannshoch closed 8 years ago

Mannshoch commented 8 years ago

If I setup Markers I'm not able to see anything. Firebug give me following errors.

ReferenceError: WPLeafletMapPlugin is not defined

WPLeafletMapPlugin.add(function () {

/impressum/ (Zeile 147, Spalte 13)
ReferenceError: WPLeafletMapPlugin is not defined

WPLeafletMapPlugin.add(function () {

/impressum/ (Zeile 167, Spalte 13)
TypeError: a is undefined

...,f).emulateTransitionEnd(150):f()};var d=a.fn.alert;a.fn.alert=function(b){retur...

autopti...4260.js (Zeile 11, Spalte 562)
bozdoz commented 8 years ago

Not able to reproduce this. See screenshots:

screenshot from 2016-06-29 16 51 23

screenshot from 2016-06-29 16 51 36

bozdoz commented 8 years ago

Also note: this is a fresh install of WordPress with the latest plugin. Perhaps you are not using Wordpress?

Mannshoch commented 8 years ago

I Use Wordpress 4.5.3 with Leaflet Map 1.16 Didn't changed any settings in Leaflet.

As a test I copied the short tags form the examples in Backend to a Site. (the shortcodes work in Backend)

bozdoz commented 8 years ago

Tested again on Firefox. My best guess is that there's a conflict with another plugin? Perhaps you could try deactivating plugins temporarily to see if that solves it. Otherwise, it's possible that the theme you're using has removed the <?php wp_head(); ?> from the header.php. In that case, the javascript file that defines WPLeafletMapPlugin wouldn't have loaded.

Mannshoch commented 8 years ago

Correct. The following app was evil one: https://wordpress.org/plugins/autoptimize/

bozdoz commented 8 years ago

ah, perhaps that plugin renamed the WPLeafletMapPlugin variable, or moved it to the footer instead. In Firebug I think you should be able to figure out if it was loaded at all by typing the variable name to see if it exists in the window scope. Glad it's resolved either way.