The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Basic Google Maps Placemarks
[resolved] parent class missing in menus (4 posts)

  1. twust
    Posted 3 years ago #


    I use BGMP 1.10 with success, but I've noticed a "bug" with WP and the menus (made with Appearance > Menus in WP): parent items loose their "parent" class in the HTML code.

    When BGMP is deactivated:

    <ul id="menu-main-nav">
    <li id="item-505" class="menu-item menu-item-type-post_type menu-item-object-page parent">
    <a href="my_link">
    My text</a>
    <li id="item-209" class="menu-item menu-item-type-post_type menu-item-object-page parent">
    <a href="my_other_link">
    My text 2</a>

    And when BGMP is activated, the HTML is exactly the same, except that the "parent" class is missing! This is very annoying as I cannot see and access the children items in the menu in this case.

    I had to adapt the BGMP code for our needs, but I don't think that my few changes have impacted anything. Maybe other users have encountered the same problem?

    Thanks for any help.


  2. Ian Dunn
    Plugin Author

    Posted 3 years ago #

    Thanks for the report. I'll look into it and if there is a bug, I'll fix it for the next release.

  3. twust
    Posted 3 years ago #

    I've found a fix, it works.

    At the beginning of basic-google-maps-placemarks/functions.js, I've added this:

    // on page without map, bgmpData is not initialised and causes javascript errors that stop all further scripts
    // so initialisation prevents js error, and the rest can be executed
    var bgmpData = bgmpData || {options:{zoom:0.0, latitude:0.0, longitude:0, clustering: {maxZoom:0, gridSize:0}}};

    Hope this helps.

  4. Ian Dunn
    Plugin Author

    Posted 3 years ago #

    Ah, cool, thanks for finding the source of the problem. The issue with bgmpData being undefined and breaking JS is actually already fixed in trunk, so It'll be in the next release (1.10.1).

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic


No tags yet.