• Resolved axntdsgn

    (@axntdsgn)


    Love the plugin – but I’m having the same problem as a previously resolved topic:
    [resolved] Plugin is in the code but doesnt display anything

    Inspecting the page output, the exact same code and script is displayed as the [resolved] topic. I know it’s a theme issue, as it works in the Twenty Thirteen theme, but not my RocketTheme Gantry theme. I tried adding this code (one at a time, and all together):
    <?php flexmap_load_scripts(); ?> to index.php (no effect)
    <?php get_footer(); ?> to index.php (broke the site)
    <?php wp_head(); ?> to header.php (no effect)

    Other than breaking the site as noted, none individually or together fixed the problem. Any ideas on what to try next?

    http://wordpress.org/plugins/wp-flexible-map/

Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter axntdsgn

    (@axntdsgn)

    Forgot a link to the site: A.M.E. Mechanical

    Thanks

    Plugin Author webaware

    (@webaware)

    G’day axntdsgn,

    Looks like something is stopping the Google Maps API script from registering or loading, which this plugin depends on. My usual suspect is that the theme isn’t calling wp_head() or wp_footer(), but it looks like it might be here — but please verify that both are called, should be one of each in the header.php and footer.php files respectively.

    NB: wp_footer.php — this outputs the scripts in the page footer, usually called in footer.php but may be in your index.php

    Otherwise, there may be a conflict with the theme over the Google Maps API script. Can you search your theme for the string google-maps and see if anything shows up? In particular, I’m interested in anything registering, deregistering, or enqueuing, but let’s see what you find.

    cheers,
    Ross

    Thread Starter axntdsgn

    (@axntdsgn)

    There is “wp_head()” in “header.php”, but “wp_footer()” was not in “footer.php” – so I added <?php wp_footer(); ?> just before the </body> tag. No effect (didn’t break the site though, so I left it in).

    I searched the entire site for the string “google-maps” and the only file that contained it was “class.FlxMapPlugin.php” – so it seems clear that the template is just not loading a critical, yet standard piece of WordPress core code. Very disappointing for a premium theme.

    If you can think of anything else I should look for in the template files, that would be extremely appreciated. I’ll attempt to get answers from RocketTheme to see what they say. I know that in cases where a 3rd party template is clearly the culprit, any help by the developer is above and beyond standard support procedures, so I’m extremely grateful for your assistance.

    Plugin Author webaware

    (@webaware)

    G’day axntdsgn,

    If you like, send me a .zip of the theme and I’ll have a quick look in a test site. You can find my email address on my contact page.

    cheers,
    Ross

    I’m having a similar problem. In the page source, I can see this:

    <script type='text/javascript' src='http://maps.google.com/maps/api/js?v=3.13&sensor=false'>
    </script>
    <script type='text/javascript' src='http://wp.oklahomastone.com/wp-content/plugins/wp-flexible-map/flexible-map.min.js?ver=1.7.1'></script>

    And in Developer Tools, I see:

    <script type='text/javascript' src='http://maps.google.com/maps/api/js?v=3.13&sensor=false'></script>
    <script src="http://maps.gstatic.com/intl/en_us/mapfiles/api-3/13/15/main.js" type="text/javascript"></script><script type='text/javascript' src='http://wp.oklahomastone.com/wp-content/plugins/wp-flexible-map/flexible-map.min.js?ver=1.7.1'></script>

    It’s worth noting that the line <script src="http://maps.gstatic.com/intl/en_us/mapfiles/api-3/13/15/main.js" type="text/javascript"></script> appears in both the head and in the body (footer). The other thing to note is the map HTML:

    <div id="flxmap-52814e3b6b589" class="flxmap-container" data-flxmap="flxmap_52814e3b6b589" style="width:614px;height:464px;"></div>
    /* <![CDATA[ */
    (function(w, fn) {
     if (w.addEventListener) w.addEventListener("DOMContentLoaded", fn, false);
     else if (w.attachEvent) w.attachEvent("onload", fn);
    })(window, function() {
     var f = new FlexibleMap();
     f.scaleControl = true;
     f.streetViewControl = true;
     f.scrollwheel = true;
     f.region = "us";
     f.setlocale("en-US");
     f.visualRefresh = true;
     window.flxmap_52814e2a68562 = f;
    });
    /* ]]> */

    Notice that closing angle bracket for the CDATA wrapper? It’s rendering as an HTML entity.

    The theme I’m using includes its own map functionality, but AFAIK, it doesn’t load anything unless I specifically add its map to the page.

    The comment filter mangled that last bit of code. On the live page, the closing angle bracket is rendering as an html entity, not ‘greater than’ sign shown above.

    Plugin Author webaware

    (@webaware)

    G’day seezee,

    Your problems are different — the scripts are loading, but you have errors on your page. Quite apart from the obvious PHP error messages being displayed currently, you have a JavaScript error thrown by the slider script in your theme. Fix that, and the map should load.

    cheers,
    Ross

    I’m not seeing the error in the slider. The theme integrates 2 sliders; which 1 are you seeing an error on?

    Plugin Author webaware

    (@webaware)

    G’day seezee,

    That JS error is gone now that you’ve resolved your PHP error; maybe it was related to that.

    Looking at the JS for the map, I’d guess you have an error in your shortcode. Please start a new support topic, so as to not further hijack this one, and post the shortcode you’re using so that I can see the problem.

    cheers,
    Ross

    Plugin Author webaware

    (@webaware)

    @axntdsgn: my eyes! the goggles, they do nothing! 🙂

    That theme framework really likes to bugger up a WordPress site. Really! What a mess.

    An easy fix is to put back the wp_enqueue_scripts action, so that plugins that register their scripts normally can still work. e.g. here’s a small plugin you can activate to get the maps working:

    <?php
    /*
    Plugin Name: Gantry footer script fix
    Description: Make sure footer scripts are printed in Gantry themes
    */
    add_action('init', 'wp_enqueue_scripts');

    Save that into your plugins folder as gantry-footer-fix.php, then activate it. Should fix your problems.

    Then go complain to the authors of that theme framework for breaking WordPress!

    cheers,
    Ross

    Thread Starter axntdsgn

    (@axntdsgn)

    WooHoo!!

    Wow, I couldn’t be more pleased (with you Ross) or more pissed (with RocketTheme). I guess this is what happens when a Joomla template developer gets a hold of WordPress 🙂

    Thanks,
    Steve

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Blank space where map should be’ is closed to new replies.