Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InternetExplorer is not longer support? #17533

Closed
KnoellMarketing opened this issue Aug 16, 2018 · 5 comments · Fixed by #17544
Closed

InternetExplorer is not longer support? #17533

KnoellMarketing opened this issue Aug 16, 2018 · 5 comments · Fixed by #17544

Comments

@KnoellMarketing
Copy link

Why the internet explorer isnt working anymore?

It was supported, but now it crashes with the javascript-error: "Das Objekt unterstützt die Eigenschaft oder Methode "assign" nicht" in v0.js (519,398) - translation (maybe not the best): "the object don't know the method "assign".

We've implemented amp by checking everything released the live project in full amp and now we look horrible and get a bad return of the customers with internet explorer.
We are able to add codes only to the internet explorer, maybe you have a fix or something?

thanks!

@KnoellMarketing
Copy link
Author

KnoellMarketing commented Aug 16, 2018

We just use a fast fix: implementing <script src="//cdn.polyfill.io/v2/polyfill.min.js"></script>, that adds the function (but is of course an AMP validation error).

@craigscott29
Copy link

craigscott29 commented Aug 16, 2018

Presumably the crawler that detects AMP validation doesn't use IE11, so you could implement this script to (hopefully) protect the AMP validation. We just used it on our site (thanks for posting this because we don't routinely check IE11).

<?php if (preg_match('~MSIE|Internet Explorer~i', $_SERVER['HTTP_USER_AGENT']) || ((strpos($_SERVER['HTTP_USER_AGENT'], 'Trident/7.0;') !== false) && (strpos($_SERVER['HTTP_USER_AGENT'], '; rv:11.0') !== false))) { ?>
	
		<script src="https://cdn.polyfill.io/v2/polyfill.min.js"></script>
	
<?php } ?>

Edit: Just ran the AMP Validator on the site and it validates with the above code in place.

Edit2: This appears to be a known issue that they are working to correct. #17505

Edit3: Updated code from post below.

@KnoellMarketing
Copy link
Author

KnoellMarketing commented Aug 16, 2018

Thanks, but the correct If-Clause will be:
if (preg_match('~MSIE|Internet Explorer~i', $_SERVER['HTTP_USER_AGENT']) || ((strpos($_SERVER['HTTP_USER_AGENT'], 'Trident/7.0;') !== false) && (strpos($_SERVER['HTTP_USER_AGENT'], '; rv:11.0') !== false)))

you need to split the second string, because for example on windows surface you have "..Trident/7.0; Touch; rv:11.0"

and we detect that lightbox was not working, maybe something more...

@craigscott29
Copy link

Thanks for the Windows Surface detection piece, I updated my post just to be safe. Company president uses a Surface and IE11 so good to have that covered haha.

Our site appeared quite broken from it due to amp-sidebar exploding at the top. Everything seems to be working correctly now with the polyfill in place.

@jridgewell
Copy link
Contributor

Closing this as a duplicate of #17505.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants