Support » Plugin: Flexible Map » Uncaught ReferenceError: FlexibleMap is not defined

Viewing 6 replies - 1 through 6 (of 6 total)
  • Where are you seeing the “FlexibleMap is not defined” error? That sounds more like a javascript error than a PHP error.

    I suspect that a javascript library required for FlexibleMap is not being loaded in the page template, but it is when you unlink the page template from the site.

    With the page template unlinked from the site, take a look all all the “.js” files loaded in the head tags, especially one that FlexibleMap might load. Make sure that script is loaded when the page template is linked to the site, and loaded only once.

    If you don’t see a .js file, look for actual code in script tags containing FlexibleMap code. The way I’d do that is just search for “flexiblemap” in the page source on the page where the map displays correctly.

    What you’re looking for is a difference in the javascript loaded on the page when it works versus when it does not.

    Once you find the library/code that’s not loading on your custom page template, you can fix it by loading the library/code.

    That makes sense, thank you very much!


    Let us know what you figure out.

    Plugin Author webaware


    @mox911: some custom themes don’t call wp_footer() in the footer. This call is needed so that WordPress can output any late-loaded scripts, including the scripts for WP Flexible Map. Just add a line like this into the footer.php file in the theme, somewhere before the </body> tag.

    <?php wp_footer(); ?>


    I found the template neither called the wp_header or wp_footer. I stripped down both of them just so they called the functions and didn’t effect the layout and added them to the template php pages. Everything works correctly now.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Uncaught ReferenceError: FlexibleMap is not defined’ is closed to new replies.