Title: breaks other plugin using google maps
Last modified: March 19, 2019

---

# breaks other plugin using google maps

 *  Resolved [Endymion00](https://wordpress.org/support/users/endymion00/)
 * (@endymion00)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/breaks-other-plugin-using-google-maps/)
 * Contributes to getting the Error: only one instance of babel-polyfill is allowed.
   This happens on a google map page that doesn’t even have content from this plugin.
   Would be helpful to have a setting for only load on pages where the shortcode
   is used.

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Author [dustinscarberry](https://wordpress.org/support/users/dman25560/)
 * (@dman25560)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/breaks-other-plugin-using-google-maps/#post-11399640)
 * Sorry, I’m not able to check this page every day. Do you have an example page/
   plugin I can test with?
 *  Thread Starter [Endymion00](https://wordpress.org/support/users/endymion00/)
 * (@endymion00)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/breaks-other-plugin-using-google-maps/#post-11399672)
 * The Google Map it broke was delivered by a Real Estate Service so it wouldn’t
   really be testable for you. The fix for me was adding code in a custom Must Use
   plugin that remove the plugin from loading except where necessary that I found
   to be on the video page itselg, while in wp-admin and calls to wp-json.
 *     ```
       if(strpos($_SERVER['REQUEST_URI'], '/the-video-page/') === FALSE && strpos($_SERVER['REQUEST_URI'], '/wp-admin/') === FALSE && strpos($_SERVER['REQUEST_URI'], '/wp-json/') === FALSE) {
                $key = array_search( 'utubevideo-gallery/utubevideo.php' , $plugins );
                if ( false !== $key ) unset( $plugins[$key] );
             }
       ```
   
 * A setting in your plugin that would allow it to only load on pages the shortcode
   is used on would be helpful.
 * Otherwise I’m not sure if it’s even possible to detect if babel-polyfill is already
   loaded and may even be a failing of the other plugin checking but since it’s 
   all loading by google delivered scripts there just may not be a way of dealing
   with it outside of restricting where the scripts load.
 * Since I only use your plugin on one page, it was similar to implement my current
   fix than anything else at the moment.
 *  Plugin Author [dustinscarberry](https://wordpress.org/support/users/dman25560/)
 * (@dman25560)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/breaks-other-plugin-using-google-maps/#post-11399692)
 * Thanks. I agree that react and babel do introduce new issues. I’m not sure if
   their is an easy way to foolproof the plugin but I will look into further options.
   I’ll also consider your suggestion of adding a white / blacklist of pages to 
   load on.
 *  Thread Starter [Endymion00](https://wordpress.org/support/users/endymion00/)
 * (@endymion00)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/breaks-other-plugin-using-google-maps/#post-11399700)
 * Seems the babel-polyfill conflict is common with other plugins as well so perhaps
   one of these links may help.
 * [https://www.google.com/search?q=wordpress+plugin+babel-polyfill+conflict&oq=wordpress+plugin+babel-polyfill+conflict](https://www.google.com/search?q=wordpress+plugin+babel-polyfill+conflict&oq=wordpress+plugin+babel-polyfill+conflict)
 * I’d contact the real estate plugin people but that’s like talking to a wall.
 *  Thread Starter [Endymion00](https://wordpress.org/support/users/endymion00/)
 * (@endymion00)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/breaks-other-plugin-using-google-maps/#post-11399715)
 * This sounds like it could present some solutions.
 * [https://github.com/babel/babel/issues/4019](https://github.com/babel/babel/issues/4019)
 * There’s simple method to check if babel-polyfill exists already before loading
   it, but that only really helps if you’re the 2nd plugin to load it.
 * There’s also mentions of using babel-runtime and transform-runtime instead that
   I guess do not have this problem.
 *  Plugin Author [dustinscarberry](https://wordpress.org/support/users/dman25560/)
 * (@dman25560)
 * [7 years ago](https://wordpress.org/support/topic/breaks-other-plugin-using-google-maps/#post-11532087)
 * A fix to use the WordPress Babel polyfill has if available has been patched in
   to version 2.0.3. However, if another plugin is not using the same method of 
   loading the polyfill issues could still occur.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘breaks other plugin using google maps’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/utubevideo-gallery.svg)
 * [uTubeVideo Gallery](https://wordpress.org/plugins/utubevideo-gallery/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/utubevideo-gallery/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/utubevideo-gallery/)
 * [Active Topics](https://wordpress.org/support/plugin/utubevideo-gallery/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/utubevideo-gallery/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/utubevideo-gallery/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [dustinscarberry](https://wordpress.org/support/users/dman25560/)
 * Last activity: [7 years ago](https://wordpress.org/support/topic/breaks-other-plugin-using-google-maps/#post-11532087)
 * Status: resolved