Ticket #1788 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

IE7 compatibility problems

Reported by: zephod Owned by: zephod
Priority: major Milestone: ckan-sprint-2012-03-05
Component: ckan Keywords:
Cc: Repository: ckan
Theme: none


From Antonia Acuno, via Ira:

It appears that the current layout for the datahub does not work in IE7, which would mean a problem for us as most gov uses it and is one of those we have to support...any views?

Tested in several gov departments computers, so a common enough issue.


From Rufus: We haven't officially supported IE7 so far but can put engineering effort into this if absolutely needed. I note that IE 7 is now 3y out of date and is likely a security risk. Obviously this is something to ask Antonio about.

Change History

comment:1 Changed 2 years ago by rgrp

  • Owner set to zephod
  • Priority changed from awaiting triage to major
  • Status changed from new to assigned
  • Milestone changed from ckan-backlog to current-ckan-sprint-2012-03-05

Believe most of these are resolved by https://github.com/okfn/ckan/commit/27f4fc776b9199621d259749cf20787328df101f

@zephod: could you check again and see if anything remains?

comment:2 Changed 2 years ago by zydio

Replying to rgrp:

Believe most of these are resolved by https://github.com/okfn/ckan/commit/27f4fc776b9199621d259749cf20787328df101f

@zephod: could you check again and see if anything remains?

I noticed that Thedatahub with latest code is still messed up..I was working with absolute paths in my environment without the h.url_for_static() to include the html5shiv.js script so I missed a problem, which can be fixed with my new [pull request #4](https://github.com/okfn/ckan/pull/4).

I'm aware of only one problem left: when you hit the "Upload a File" button inside the Dataset Edit/Resources? tab nothing happens in IE < 9. This is related to those IE versions not being able to dynamically insert HTML 5 tags, which breaks some jquery-tmpl (actually JQuery) operation (if you debug the code everything works in jquery-tmpl until one of the latest operation involving JQuery returns null instead of the expected object). I was able to fix the issue in my environment by adding the following conditional comment:

 <!--[if lt IE 9]>
 <script type="text/javascript" src="/scripts/jquery.html5.preie9fix.js">

where the jquery.html5.preie9fix.js is simply the [gist](https://gist.github.com/887560) published by Akkuma in a [jquery-tmpl issue (#36)](https://github.com/jquery/jquery-tmpl/issues/36#issuecomment-918495).

This script patches JQuery on the fly on IE < 9 to rework in memory html 5 blocks handled by JQuery, so that it doesn't break.

And this fixes the "Upload a File" button on IE. I didn't commit/pull this specific fix for the following reasons:

  • the script embeds innerShiv, which is a previous incarnation of html5shiv (now included in CKAN). It doesn't sound fine to include 2 pieces of code with similar effect, but I couldn't reproduce the fix with html5shiv!
  • in my environment I have included this fix sitewide even if I didn't spot other problematic features..I don't know if it would be better to include it only on the dataset edit page in the official CKAN code.

Summary: I leave to you guys the choice on how to deal with this problem.

comment:3 Changed 2 years ago by zydio

Erh...sorry for some formatting errors in my comment. I used markdown formatting for links, and used the #NUMBER format to cite issues, which obviously is interpreted by Trac as references to his own issues...my bad.

comment:4 Changed 2 years ago by rgrp

Re the Upload file button not sure what's best. We do have plans to replace jquery-tmpl with mustache in the near future (but not clear exactly *how* near). We'll think about this and get back to you. Thanks for the detailed debug report.

comment:5 Changed 2 years ago by zephod

  • Status changed from assigned to closed
  • Resolution set to fixed

I've been performing a full sweep of the site to rebuild the markup & stylesheets using Bootstrap, and in doing so have managed to close off this ticket. Bootstrap allows us to delegate lots of clever functionality and layouts to Twitter's tried-and-tested code, making it easier to be compatible with IE7.

It has brought up plenty of issues: Lots of Javascript was broken; plenty of pages generate broken doctypes causing the browser to go into quirks mode (which in turn causes the page to explode all over the screen); most dynamic content would fail to generate properly in one way or another.... (see the #1788 branch for a log of issues encountered).

I've been refactoring our JS and have managed to strip ckanjs, too, because the only significant element we'd used was the File Upload view (which also now works in IE7).

test.ckan.net has been redeployed on master; I'm browsing the site in IE7 and everything is looking great :-)

Note: See TracTickets for help on using tickets.