[Bug 10652] New: Ajaxfileupload.js failing in IE9 for local image upload
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10652 Bug ID: 10652 Summary: Ajaxfileupload.js failing in IE9 for local image upload Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: gmcharlt@gmail.com Reporter: dcook@prosentient.com.au QA Contact: testopia@bugs.koha-community.org Currently, when you try to upload a local cover image in IE9, Koha throws a Javascript error and reloads the "upload-cover-image.pl" page without uploading the image. This appears to be the result of a change in the arguments available to the "createElement" Javascript function in IE9 (and probably IE9+). I imagine this has implications in other parts of Koha as well, including the MARC upload, which was the original motivator for the creation of ajaxfileupload.js, I believe. (The code was added by Galen in 2007 according to git blame, so he might know.) In any case, I'm just going to introduce a try/catch which will cover all scenarios. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10652 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff CC| |dcook@prosentient.com.au Assignee|gmcharlt@gmail.com |dcook@prosentient.com.au --- Comment #1 from David Cook <dcook@prosentient.com.au> --- Created attachment 19971 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=19971&action=edit 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. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10652 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10652 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #19971|0 |1 is obsolete| | --- Comment #2 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 20111 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=20111&action=edit [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. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10652 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10652 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #20111|0 |1 is obsolete| | --- Comment #3 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 20822 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=20822&action=edit 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. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10652 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |In Discussion CC| |gmcharlt@gmail.com --- Comment #4 from Galen Charlton <gmcharlt@gmail.com> --- 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. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10652 --- Comment #5 from Galen Charlton <gmcharlt@gmail.com> --- (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. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10652 Liz Rea <liz@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Passed QA CC| |liz@catalyst.net.nz --- Comment #6 from Liz Rea <liz@catalyst.net.nz> --- 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 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10652 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=12526 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10652 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |tomascohen@gmail.com --- Comment #7 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Patch pushed to master. Thanks David! Note: new bug for updating Ajaxfileupload.js from upstream created (bug 12526) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10652 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |In Discussion --- Comment #8 from Galen Charlton <gmcharlt@gmail.com> --- Pushed to 3.16.x for inclusion in 3.16.2. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10652 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10652 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10652 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Stable -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org