Summary: | Ajaxfileupload.js failing in IE9 for local image upload | ||
---|---|---|---|
Product: | Koha | Reporter: | David Cook <dcook> |
Component: | Architecture, internals, and plumbing | Assignee: | David Cook <dcook> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | dcook, gmcharlt, liz, tomascohen |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12526 | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Attachments: |
Bug 10653 - Ajaxfileupload.js failing in IE9 for local image upload
[SIGNED-OFF] Bug 10652 - Ajaxfileupload.js failing in IE9 for local image upload Bug 10652 - Ajaxfileupload.js failing in IE9 for local image upload |
Description
David Cook
2013-07-29 03:00:42 UTC
Created attachment 19971 [details] [review] Bug 10653 - Ajaxfileupload.js failing in IE9 for local image upload This patch adds a try/catch to the Javascript for adding the iframe element. The try will work for IE8 and older versions, while newer versions and other browsers will be covered by the check. Test Plan: 1) Try uploading a local cover image in IE9 2) Notice that your page is reloaded with no result (except the pop-up of a Javascript error, if you have error reporting on in your browser). 3) Apply the patch 4) Trying uploading a local cover image again 5) Notice that it uploads correctly 6) Repeat steps 4 and 5 for IE8, IE7, and/or other modern browsers. Created attachment 20111 [details] [review] [SIGNED-OFF] Bug 10652 - Ajaxfileupload.js failing in IE9 for local image upload This patch adds a try/catch to the Javascript for adding the iframe element. The try will work for IE8 and older versions, while newer versions and other browsers will be covered by the check. Test Plan: 1) Try uploading a local cover image in IE9 2) Notice that your page is reloaded with no result (except the pop-up of a Javascript error, if you have error reporting on in your browser). 3) Apply the patch 4) Trying uploading a local cover image again 5) Notice that it uploads correctly 6) Repeat steps 4 and 5 for IE8, IE7, and/or other modern browsers. Signed-off-by: Owen Leonard <oleonard@myacpl.org> Tested in IE10 in IE10 "browser mode" and IE9 mode as well as in Firefox. Uploads work correctly with book cover images and in MARC uploads. Created attachment 20822 [details] [review] Bug 10652 - Ajaxfileupload.js failing in IE9 for local image upload This patch adds a try/catch to the Javascript for adding the iframe element. The try will work for IE8 and older versions, while newer versions and other browsers will be covered by the check. Test Plan: 1) Try uploading a local cover image in IE9 2) Notice that your page is reloaded with no result (except the pop-up of a Javascript error, if you have error reporting on in your browser). 3) Apply the patch 4) Trying uploading a local cover image again 5) Notice that it uploads correctly 6) Repeat steps 4 and 5 for IE8, IE7, and/or other modern browsers. Signed-off-by: Owen Leonard <oleonard@myacpl.org> Tested in IE10 in IE10 "browser mode" and IE9 mode as well as in Firefox. Uploads work correctly with book cover images and in MARC uploads. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Also verified as working in Chrome. The AJAX file upload plugin was not written by me. It was originally written by Øyvind Saltvik, although the current canonical fork appears to be http://www.phpletter.com/Our-Projects/AjaxFileUpload/. The change log for the most recent version of this plugin claims to have fixed the IE9 issue. For third-party code, I prefer that we stick with the stock version without modification unless upstream cannot or does not fix bugs that affect Koha. To that end, does somebody have a moment to test the most recent version of the stock plugin? There's another issue: I can find no statements whatsoever about the license of ajaxfileupload.js. Mea culpa -- and that's actually an issue I care about more nowadays than my concern about not bundling modified third-party libraries. It looks like the top upload plugin in the jQuery repository is jQuery File Upload by Sebastian Tschan. It's license is MIT. Setting to in discussion to see if anybody has tuits to test an uploader plugin with a clear (and of course, compatible) license, but if those tuits don't arise soon, I'm not opposed to pushing David's patch as is, though I expect that it will be superseded. (In reply to Galen Charlton from comment #4) > my concern about not bundling modified third-party > libraries. Or I should say, not modifying bundled third-party libraries. I confirm that this fixes this issue, and also fixes another issue with syspref setting in IE9. I don't think I personally mind if this patch gets superseded in the future, I'd like to see it in. Cheers, Liz Patch pushed to master. Thanks David! Note: new bug for updating Ajaxfileupload.js from upstream created (bug 12526) Pushed to 3.16.x for inclusion in 3.16.2. |