WordPress.org

Ready to get started?Download WordPress

Forums

WP Flexible Map
[resolved] Map just vanished (5 posts)

  1. Southwest
    Member
    Posted 12 months ago #

    Just as soon as I resolved one issue, another cropped up. Whoops. :)

    All of a sudden, my shortcodes stopped working. This page should have a map on it, defined by this shortcode:

    [flexiblemap width="600" height="350" zoom="17" scrollwheel="true" hidemaptype="true" region="jp" src="http://associatedkyotoprogram.dreamhosters.com/wp-content/uploads/resources/maps/akp-doshisha-campus.kml"]

    But instead, no map shows up, and I get the following errors in the console:

    Uncaught ReferenceError: FlexibleMap is not defined http://www.associatedkyotoprogram.dreamhosters.com/maps-and-directions-2/:252
    Blocked a frame with origin "https://widgets.wp.com" from accessing a frame with origin "http://www.associatedkyotoprogram.dreamhosters.com". The frame requesting access has a protocol of "https", the frame being accessed has a protocol of "http". Protocols must match.
    Blocked a frame with origin "https://public-api.wordpress.com" from accessing a frame with origin "https://widgets.wp.com". Protocols, domains, and ports must match.

    It was just working, and I haven't changed the location of any files or anything. Any idea what could be causing this?

    Thanks a bunch.

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

  2. webaware
    Member
    Plugin Author

    Posted 12 months ago #

    G'day Southwest,

    The Google Maps API script and the script for this plugin both load in the footer, called by the wp_footer hook. If your theme isn't loading the footer.php, it's probably going to miss that hook so you'll need to call wp_footer() yourself at the bottom of the page template.

    cheers,
    Ross

  3. Southwest
    Member
    Posted 12 months ago #

    Hi Ross,

    Thanks for your response. I looked into it, and the theme I'm using (Gantry Theme for WordPress) calls the method $gantry->displayFooter() in footer.php and index.php. Based on some other research, it seems that calls the wp_footer() function internally.

    Nevertheless, after the line <?php $gantry->displayFooter();?> in index.php, I added another line: <?php wp_footer();?> When I checked the page... nothing. The map's still gone.

    I'm particularly confused by this, because I posted a separate issue two days ago or so about KML files, and when that was going on, the map was loading fine. I didn't make any big changes between then and now, so I'm really clueless as to what could be causing this.

    edit: I am getting different error messages in the console, though. So... that's something?

    Uncaught ReferenceError: Class is not defined rokmediaqueries.js:80
    Uncaught ReferenceError: jQuery is not defined notifications.js:1
    Uncaught ReferenceError: jQuery is not defined mediaelement-and-player.min.js?ver=2.1.3:64
    Uncaught TypeError: Object [object global] has no method 'addEvent' http://www.associatedkyotoprogram.dreamhosters.com/maps-and-directions-2/:118
    Uncaught ReferenceError: jQuery is not defined wpgroho.js:1
    Uncaught TypeError: Cannot read property 'fn' of undefined jquery.spin.js:54
    Uncaught ReferenceError: jQuery is not defined notes-common-v2.js:108
    Uncaught ReferenceError: jQuery is not defined admin-bar-v2.js:60
    Uncaught ReferenceError: FlexibleMap is not defined http://www.associatedkyotoprogram.dreamhosters.com/maps-and-directions-2/:253

  4. webaware
    Member
    Plugin Author

    Posted 12 months ago #

    G'day Southwest,

    Well, all I can say is that the footer scripts are not being output. If they were before and are not now, then something has changed :)

    Can you delete your WP Super Cache cache files, and check again? Also maybe look at disabling plugins to see if that makes a difference (start by disabling WP Super Cache so that the page refreshes each time you test).

    Worst case is that the weird thing your theme is doing by messing with the head/footer calls is causing it, so you might need to call this in your functions.php just to ensure the required scripts are loaded:

    flexmap_load_scripts();

    cheers,
    Ross

  5. Southwest
    Member
    Posted 12 months ago #

    Hey Ross,

    Thanks for your patience and your help. I added a wp_head() call right after $gantry->displayHead(), which was supposed to call wp_head() anyway... but oh well.

    Anyway, that fixed things. The map is displaying.

    Hopefully, the rest of my development will proceed without any more hiccups!

    Thanks again.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags