• Resolved Hook and Loop

    (@twodozen)


    Since updating to LMM v3.2 and WP v3.5, I’m getting this error on pages using shortcodes to call maps:

    “Leaflet Maps Marker warning!
    You must enqueue the plugin stylesheets manually if you want to show maps by calling do_shortcode() in your template files!
    Please add the following code before your get_header() call inside your template, which is usually located in header.php:

    $plugin_version = get_option(‘leafletmapsmarker_version’);
    global $wp_styles;
    wp_enqueue_style( ‘leafletmapsmarker’, LEAFLET_PLUGIN_URL . ‘leaflet-dist/leaflet.css’, array(), $plugin_version );
    wp_enqueue_style( ‘leafletmapsmarker-ie-only’, LEAFLET_PLUGIN_URL . ‘leaflet-dist/leaflet.ie.css’, array(), $plugin_version );
    $wp_styles->add_data(‘leafletmapsmarker-ie-only’, ‘conditional’, ‘lt IE 9’);

    ********

    Anyone else experience this?

    https://www.ads-software.com/extend/plugins/leaflet-maps-marker/

Viewing 13 replies - 16 through 28 (of 28 total)
  • Hello,

    I am getting these two error messages:

    1) Warning: session_start() [function.session-start]: Cannot send session cache limiter – headers already sent …..

    2) Warning: Missing argument 2 for wpdb::prepare(), …

    Can you please advise what I need to do so I may use the plugin again? I really liked the plugin when I was first able to use it with no glitches.

    Thank you!
    Jocelyn
    https://nwsuburbschicago.com

    Hi Jocelyn,
    have you tried the latest version v3.2.4 -l should have no wpdb:prepare-warnings (are you sure these are from my plugin? wp 3.5 introduced a new check for prepare() which leads to this warnings on many plugins).
    if updating to latest version didnt work – did you try the steps from https://mapsmarker.com/readme-first ?
    best regards,
    Robert

    PS: as I give support for free, I’d appreciate your review at https://www.ads-software.com/support/view/plugin-reviews/leaflet-maps-marker

    Hello Robert,

    Yes, I have updated to the latest and version and I have read the “readme first” and followed all the necessary steps as you had indicated from that post.

    Thanks,
    Jocelyn

    Hi Jocelyn,
    as indicated in the post, I would need an URL where I can take a look at your map ??
    regards,
    Robert

    Of course, here’s the direct link to the map section -> https://nwsuburbschicago.com/places-to-go/

    Thanks for looking into it, Robert.

    Jocelyn

    PS: Please advise as soon as you can, as I do not want to keep that page up as it can be a security issue. I just published that page again so you can see it. Thank you!

    No worries – this aint a security issue. But thanks for reporting – since WordPress 3.5, prepare()-functions are handled more strictly.

    Open /inc/showmap.php and change line 313 from

    $mlm_all_layers = $wpdb->get_results( $wpdb->prepare( "SELECT id FROM $table_name_layers" ), ARRAY_A );

    to

    $mlm_all_layers = $wpdb->get_results( "SELECT id FROM $table_name_layers", ARRAY_A );

    this will solve your issue (fix will be included in the next release.
    regards,

    Robert

    That was quick! Is this something I do with my web server?

    Thanks! And good to know it’s not a security issue. Whew! ??

    no, was an error with my plugin since wordpress 3.5

    Hey Robert,

    I don’t know who to contact to make this type of change…. I contacted HostGator but they said this is a coding issue that I need to contact the developer, they said to contact you. So now I’m back in square 1….can you get that corrected?

    Jocelyn

    Are you wordpress admin of your site? I guess so. Then go to Plugins / Editor – select leaflet maps marker from the dropdown, select showmap.php file from the list on the right, search for the code I posted above and replace it with the new one.

    v3.2.5 will also include this fix, but I cant tell you a release date yet as I have to fix another issue first…
    regards,
    Robert

    Hurray Robert! That fixed it. And I learned something new in the process. Thank you. Didn’t realize I can make that correction in my Dashboard. ?? Is this going to be a reflection of how to do business with you? I will for sure give a good recommendation!

    Looking forward to the new release to help correct the other issue. Thank you Robert.

    Enjoy your day!
    Jocelyn

    see – not that difficult – glad you made it ??

Viewing 13 replies - 16 through 28 (of 28 total)
  • The topic ‘3.2 requires adding to code to header of template files’ is closed to new replies.