-
AuthorPosts
-
September 15, 2020 at 4:59 pm #1246094
Hi,
we’re encountering a polyfill JS error in Internet Explorer 11 (Win10) that crashes our store locator map.
Could you please help us fix it?
Best regards
StephSeptember 20, 2020 at 7:41 pm #1247181Hey brandreach_at,
Sorry for the late reply, I didn’t find any Polyfill plugins or scripts on your site, and I didn’t find any errors in the IE11 console, but the map didn’t load, the Store Locator Plus plugin support says it works with IE11 and typically the issue is with other plugins, did you try disabling your other plugins?
IE11 is quite old now and generally doesn’t work like other modern browsers do, this is why you get a warning when you login to WordPress with IE11.
In IE11 it looks like the map container is empty. The plugin does seem to work with Edge, the replacement for IE11.
Please try contacting the plugin author, I would imagine that they would have a solution for this as we do not support third-party plugins.Best regards,
MikeSeptember 21, 2020 at 3:32 pm #1247387Hi Mike,
each of the plugins we have on this site, is integrated with the same version on another page of ours where Store Locator Plus works on IE11 as well.
I’ve attached a screenshot of the errors our IE11 console is giving us.
We’ve had enfold running on Gutenberg at first but switched to WP classic editor as we saw the polyfill error. Could it still have something to do with that?Best regards
StephSeptember 22, 2020 at 1:26 pm #1247613Hi,
Thanks for the feedback and screenshot, I tried switching to the Gutenberg editor and checking on IE11, but it didn’t recreate the error. If the error shows you again try clicking on the first error in the console:
script5005: string expected js (44,436)
typically this will take you to the error in the script, I see this happens twice in your screenshot before the polyfill error.
In my research I did find a similar error, but I’m not sure how this relates to your issue other than another IE11 issue.
So you have another identical page on the same site that works on IE11? Can you link to it?Best regards,
MikeSeptember 22, 2020 at 4:06 pm #1247651Hi Mike,
the script error you referred to seems to be from a Google API JS (see screenshot).
As for the site where the SLP is working: it’s not identical but all the plugins our ‘broken’ site has are installed on the working site as well (and then some). We’ve also compared the plugin versions for possible discrepancies but they’re the same ones.
Not sure if the polyfill errors are related as i only have access to our minified version of the polyfill JS stated in the error.
Best regards,
StephSeptember 23, 2020 at 2:08 pm #1247869Hi,
Thanks for the screenshot, so the error on line 44 is basically “if null throw error ‘must not be null'” but since it is for the Ga hosted script the error must be before this. I wonder if it has to do with cookie permissions, I see you have a custom script to “delete already set cookies if disabling afterwards”?
But checking your other site on IE11 the plugin seems to be working with Enfold and you said the plugins are the same? Is this on the same server, PHP version?
If so, then there should be something that is different. I noticed on your live site, on IE11 the map shows and then when I accept the cookie banner the page reloads, slowly almost like it was going to crash, and then it shows again. So this is why I’m thinking this is related, but perhaps not.
So the one that works is your live site, and the other is a dev site? If the live site is cloned to the dev site, does the map then work on IE11?
Are you trying to have a cloned dev site to test with, or is the dev site ment to be a future new site? Just wondering if cloning would be an option.Best regards,
MikeSeptember 25, 2020 at 10:04 am #1248354Hi Mike,
we’ve found what’s causing the error and it was indeed a polyfill issue.
In IE11 some ‘modern’ JS functions don’t work, which is why a lot of libraries stock up on them. WordPress is doing this with wp-polyfill, Google Maps does the same thing – these two code parts collided.
Our solution was to only load 90% of the polyfills since the missing 10% will be delivered by Google Maps. wp-polyfill will assume that the browser already knows the functions and therefore this part will not be loaded double.
To achieve that, we’ve added the following code in the last line of our functions.php
// load custom polyfill for IE11 <-> Google Maps collision function maps_my_custom_js() { echo '<script src="https://polyfill.io/v3/polyfill.js?features=Symbol%2CObject.getOwnPropertySymbols%2CSymbol.asyncIterator%2CSymbol.for%2CSymbol.hasInstance%2CSymbol.isConcatSpreadable%2CSymbol.iterator%2CSymbol.keyFor%2CSymbol.match%2CSymbol.replace%2CSymbol.prototype.description%2CSymbol.search%2CSymbol.species%2CSymbol.split%2CSymbol.toPrimitive%2CSymbol.toStringTag%2CSymbol.unscopables"></script>'; } add_action( 'wp_head', 'maps_my_custom_js' );
That solved the issue for us and the map is being displayed again.
Best regards
StephSeptember 25, 2020 at 12:17 pm #1248409Hi,
Thanks for sharing your solution, and glad you were able to sort this out, I assume we can close this now?Best regards,
MikeOctober 27, 2020 at 4:39 pm #1256141Hi Mike,
yes the thread can be closed, thank you.
BR
October 27, 2020 at 8:06 pm #1256199Hi brandreach_at,
Great :)
We are closing the thread.
If you need further assistance please let us know in a new one.
Best regards,
Victoria -
AuthorPosts
- The topic ‘polyfill JS error in Internet Explorer 11’ is closed to new replies.