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

Overriding Compatibility View in IE9 #6163

Closed
drammons opened this issue Sep 8, 2014 · 9 comments
Closed

Overriding Compatibility View in IE9 #6163

drammons opened this issue Sep 8, 2014 · 9 comments
Assignees
Labels
Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change.
Milestone

Comments

@drammons
Copy link

drammons commented Sep 8, 2014

We recently did a major upgrade, and I see that you dropped support for IE8 or less. However, The meta tag for overriding compatibility mode in IE9+ only works if it is in front of IE conditional statements. As such, IE9 ignores the meta tags you added altogether, and this won't work:

<!DOCTYPE html>
<!--[if lt IE 9 ]>
<html class="old-ie" id="ng-app" ng-app="piwikApp"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!-->
<html id="ng-app" ng-app="piwikApp"><!--<![endif]-->
    <head>
        {% block head %}
            <meta charset="utf-8">
            <title>{{ siteName|raw }} - {% if isCustomLogo == false %}Piwik &rsaquo; {% endif %} {{ 'CoreHome_WebAnalyticsReports'|translate }}</title>
            <meta http-equiv="X-UA-Compatible" content="IE=EDGE,chrome=1"/>

See: http://tesmond.blogspot.it/2011/10/ie9-intranet-compatibility-mode-in.html

@mattab
Copy link
Member

mattab commented Sep 8, 2014

@drammons We haven't yet dropped support of IE8, we will do this in: #4620

can you detali the problems of Piwik under IE8, maybe we could address them?

@mattab mattab added the Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change. label Sep 8, 2014
@mattab mattab added this to the Short term milestone Sep 8, 2014
@drammons
Copy link
Author

drammons commented Sep 8, 2014

We happen to employ compatibility mode in our intranet for legacy web applications, so the IE9 installations run it by default. X-UA-Compatible meta tag should override compatibility mode for IE9, but it cannot because you have IE conditional statements preceding said meta tag, rendering the meta tag ineffective. All you have to do is load up piwik on an IE9 browser and run compatibility mode to see what I mean.

Our intranet policy is IE9+ only, so I had to open up Morpheus and remove the IE conditional statements completely in order for the X-UA-Compatible meta tag to function.

I hope that makes sense

@mattab
Copy link
Member

mattab commented Sep 9, 2014

@drammons do you maybe have possibility to submit a pull request fixing the error in our code so it works well on IE8 and IE9 in both modes?

@drammons
Copy link
Author

Before I do, I'd like to do a little more research. It looks like you were using the HTML5 Boilerplate code. Is that so?

@Fensterbank
Copy link
Contributor

Because I had the same problem (business intranet) I worked on this issue and moved the conditional tag to the body-section. So we never have IE conditional statements precending the X-UA-Compatible meta tag and it works in IE9 in intranet.

@drammons
Copy link
Author

I considered doing that, but I don't think it's valid HTML at that point. meta tags are supposed to go in the

@Fensterbank
Copy link
Contributor

I don't get what you wanted to say, but I think a html-Tag inside IE conditional statements is same valid or invalid as a body-Tag inside IE conditional statements. ;-)
I'm sure there are better ways than conditional tags and a class "old-ie", but this will be lots of work to be done.
In my eyes, this issue is a major bug, because Piwik simply DOES NOT WORK in a typical business intranet at the moment.

@mattab
Copy link
Member

mattab commented Nov 24, 2014

@Fensterbank submitted a Pull request in #6687

@drammons maybe you have a chance to test it and confirm it fixes the issue for you?

(I haven't tested it yet)

@mattab mattab modified the milestones: Piwik 2.10.0 , Short term Nov 28, 2014
@mnapoli mnapoli self-assigned this Dec 1, 2014
@drammons
Copy link
Author

drammons commented Dec 8, 2014

Hi guys. Sorry, life got crazy. As for the truncated comment above, I don't have an explanation for that, other than trying to make a github comment via mobile. @Fensterbank I misread your original comment, and I think it's an excellent fix. Well done.
I see it's already been merged, but I'll kick it around anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change.
Projects
None yet
Development

No branches or pull requests

4 participants