icons borked in IE9 with IE8 compatibility mode tag set

icons borked in IE9 with IE8 compatibility mode tag set

by tim st.clair -
Number of replies: 5
Picture of Plugin developers

I have a 2.4.1 site (specifically: 2.4.1+ Build: 20130214) where to make all the scorm packages "talk" to moodle and record their results, I've had to put in the dreaded <meta http-equiv="X-UA-Compatible" content="IE=8" /> tag so IE9 goes into quirks mode, which for some stupid reason makes Javascript able to talk properly... 

I'd applied the famfam custom icon set already, which worked fine with Moodle 2.3, but now after the upgrade all the "fallback" icons show little red X's.

This tracker job seemed to indicate IE8+ compatibility with the new svg icons:

https://tracker.moodle.org/browse/MDL-36436

I'm perhaps wondering if IE9 in IE8 quirks mode doesn't properly support SVG or something silly. It's all I can think of. (p.s. I checked the /pix/i/ folder where the images are and found that the gif versions still exist, so I'm guessing that the browser is being assumed to be able to support the SVG versions when actually it can't).

Average of ratings: -
In reply to tim st.clair

Re: icons borked in IE9 with IE8 compatibility mode tag set

by Amy Groshek -
Tim, did you hear back from anyone about this? Another user is running into it here: https://moodle.org/mod/forum/discuss.php?d=243917

I can confirm that it still occurs in 2.5. When accessing the same site with straight IE8, non-svg icon is shown. When accessing the site with IE9 in IE8 document mode, the svg icon is served, and then the browser does not render.
In reply to Amy Groshek

Re: icons borked in IE9 with IE8 compatibility mode tag set

by Matteo Scaramuccia -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Hi Amy,
has an issue already been filed into the Tracker?
It should be quite simple to fix it by adding a new check for the IE Compatibility View, which is now part of core_useragent():

diff --git a/lib/classes/useragent.php b/lib/classes/useragent.php
index 3782b5c..1484c36 100644
--- a/lib/classes/useragent.php
+++ b/lib/classes/useragent.php
@@ -860,7 +860,7 @@ class core_useragent {
             if ($instance->useragent === false) {
                 // Can't be sure, just say no.
                 $instance->supportssvg = false;
-            } else if (self::is_ie() and !self::check_ie_version('9')) {
+            } else if (self::is_ie() and !self::check_ie_version('9') and self::check_ie_compatibility_view()) {
                 // IE < 9 doesn't support SVG. Say no.
                 $instance->supportssvg = false;
             } else if (preg_match('#Android +[0-2]\.#', $instance->useragent)) {

If you'll add me as watcher, I'll create a PR, tests included, for the latest 2.x (2.4 onwards).

HTH,
Matteo

In reply to Matteo Scaramuccia

Re: icons borked in IE9 with IE8 compatibility mode tag set

by Dan Poltawski -
I couldn't find an issue, so created MDL-43082
In reply to Dan Poltawski

Re: icons borked in IE9 with IE8 compatibility mode tag set

by Amy Groshek -

@Dan, I'm not able to log in to JIRA at the moment, so I can't refine replication details, but this error is occurring under very specific conditions:

  1. Accessing with browser IE9 or IE10
  2. Theme has been modified with tag to force IE8 mode, as indicated by user post above.

Themes are being modified in this way by heavy users of SCORM. There is a Flash bug which blocks fscommand() in IE9, preventing communication of SWFs with external JS, and thus communication of many SCORM SCOs with LMS. Any SWF compiled from AS2 uses fscommand(). Authorware vendors may be updating their software, but our clients do not always pay for upgrades to authorware suites. Existing content packages would also have to be converted or re-authored and complied from AS3.

Hopefully Matteo's suggestion above would fix? Is it possible that adding the meta tag, putting the browser in IE8 mode after page load starts, interferes with the server's ability to provide the right user agent data? For whatever reason, the server still thinks it's serving to IE9.

This seems related to a bug Dan Marsden has been following, about the ability of modules to write headers. https://tracker.moodle.org/browse/MDL-30039

Dan M also recently removed his patch to insert the <meta> tag from SCORM module. Apparently it does not work. (I think it has to be the first <meta> tag after the <head> tag.) https://tracker.moodle.org/browse/MDL-41577 When the change originates from the theme rather than the SCORM player the browser mode is altered for ever page viewed. This is why users start seeing the Xes in the place of icons.

In reply to Matteo Scaramuccia

Re: icons borked in IE9 with IE8 compatibility mode tag set

by Matteo Scaramuccia -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Hi All,
a fix, slightly different from my proposal above, is now available for 2.6/2.7: see MDL-43082 for the details.

HTH,
Matteo