Bug 3130

Summary: IE7: Javascript warning on Holds ratios to calculate if there are no hold ratios over the threshold
Product: Koha Reporter: Chris Cormack <chris>
Component: Browser compatibilityAssignee: Galen Charlton <gmcharlt>
Status: CLOSED FIXED QA Contact:
Severity: minor    
Priority: PATCH-Sent (DO NOT USE) CC: gmcharlt, oleonard
Version: rel_3_0   
Hardware: PC   
OS: All   
URL: http://staff-dfs4.dev.kohalibrary.com/cgi-bin/koha/circ/reserveratios.pl
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:

Description Chris Cormack 2010-05-21 01:06:49 UTC


---- Reported by daniel.sweeney@liblime.com 2009-04-16 22:45:41 ----

When the admin enters the Holds Ratios form, if there are no holds in the system that meet the selected  criteria, IE7 raises a javascript error:  line 3, char 6697  error: 'undefined' is null or not an object 

If you ignore the warning, the page works otherwise. The warning does not come up if any holds meet the criteria on the form.



---- Additional Comments From joe.atzberger@liblime.com 2009-04-28 20:13:50 ----

This bug is reported by FF/Firebug also.  The error appears to be internal to jquery.tablesorter.min.js.  

tablesorter reports an error that breaks the minified version before 2.0.3:
http://tablesorter.com/changelog

The date suggest that we have the working version, but I want to DL and diff against the current one.



---- Additional Comments From joe.atzberger@liblime.com 2009-04-28 20:29:28 ----

FYI, Firebug error is "parsers is undefined", but w/ the minified jquery file, the line number (2) is meaningless.



---- Additional Comments From joe.atzberger@liblime.com 2009-04-28 23:28:08 ----

Confirmed minified version is current.  Attempting to debug w/ non-minified version shows same error "parsers is undefined" from line 483.  

That's the inner line from:

function getCachedSortType(parsers,i) {
    return parsers[i].type;
};

I think the problem is that the table is empty/missing initially.  This script has some other errors that need to be cleaned up too.  Specifically, it is passing more holds than necessary to the template and letting a template conditional inside the loop control whether to display or not.  That doesn't make sense, and it forces the table to be displayed even when all rows FAIL the conditional.  



---- Additional Comments From gmcharlt@gmail.com 2009-04-29 12:44:58 ----

Patch pushed.  Please test and close.



---- Additional Comments From daniel.sweeney@liblime.com 2009-04-29 17:58:26 ----

Confirmed fixed. 



--- Bug imported by chris@bigballofwax.co.nz 2010-05-21 01:06 UTC  ---

This bug was previously known as _bug_ 3130 at http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=3130

Actual time not defined. Setting to 0.0
The original reporter of this bug does not have
   an account here. Reassigning to the person who moved
   it here: chris@bigballofwax.co.nz.
   Previous reporter was daniel.sweeney@liblime.com.
The original assignee of this bug does not have
   an account here. Reassigning to the default assignee
   for the component, gmcharlt@gmail.com.
   Previous assignee was joe.atzberger@liblime.com.