WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. twust
    Member
    Posted 1 year ago #

    Hello,

    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>
    <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>
    </li>
    </ul>

    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.

    http://wordpress.org/extend/plugins/basic-google-maps-placemarks/

  2. Ian Dunn
    Member
    Plugin Author

    Posted 1 year 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
    Member
    Posted 1 year 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
    Member
    Plugin Author

    Posted 1 year 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

Tags

No tags yet.