Summary: | Javascript error when merging authorities | ||
---|---|---|---|
Product: | Koha | Reporter: | Kyle M Hall (khall) <kyle> |
Component: | Cataloging | Assignee: | Kyle M Hall (khall) <kyle> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | critical | ||
Priority: | P5 - low | CC: | bgkriegel, francois.charbonnier, fridolin.somers, gmcharlt, m.de.rooy, tomascohen |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: |
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12266 http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11369 |
||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Bug Depends on: | |||
Bug Blocks: | 36659 | ||
Attachments: |
Bug 12295 - Javascript error when merging authorities
[SIGNED-OFF] Bug 12295 - Javascript error when merging authorities Bug 12295: fix Javascript error when merging authorities Bug 12295: fix Javascript error when merging authorities |
Description
Kyle M Hall (khall)
2014-05-20 18:57:53 UTC
Created attachment 28376 [details] [review] Bug 12295 - Javascript error when merging authorities Attempting to merge authorities results in the following error: Uncaught SyntaxError: Unexpected token u authorities-home.pl:284 showMergingInProgress authorities-home.pl:284 (anonymous function) authorities-home.pl:297 o jquery.js:2 p.fireWith jquery.js:2 e.extend.ready jquery.js:2 c.addEventListener.B This appears to be an improper use of Javascript null vs undefined. A variable can be null and defined at the same time. We should be checking to see if the variable is defined, rather than null. Upgrading importance to major considering that this breaks authorities merging. Created attachment 28498 [details] [review] [SIGNED-OFF] Bug 12295 - Javascript error when merging authorities Attempting to merge authorities results in the following error: Uncaught SyntaxError: Unexpected token u authorities-home.pl:284 showMergingInProgress authorities-home.pl:284 (anonymous function) authorities-home.pl:297 o jquery.js:2 p.fireWith jquery.js:2 e.extend.ready jquery.js:2 c.addEventListener.B This appears to be an improper use of Javascript null vs undefined. A variable can be null and defined at the same time. We should be checking to see if the variable is defined, rather than null. Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> No test plan, no errors. Test 1. search some authorities 2. clic merge, on browser dev console pops reported error message 'Unexpected token u authorities-home.pl...' No way to marge auths 3. with pach applied, merging works again Created attachment 28500 [details] [review] Bug 12295: fix Javascript error when merging authorities Attempting to merge authorities results in the following error: Uncaught SyntaxError: Unexpected token u authorities-home.pl:284 showMergingInProgress authorities-home.pl:284 (anonymous function) authorities-home.pl:297 o jquery.js:2 p.fireWith jquery.js:2 e.extend.ready jquery.js:2 c.addEventListener.B This appears to be an improper use of Javascript null vs undefined. A variable can be null and defined at the same time. We should be checking to see if the variable is defined, rather than null. Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> No test plan, no errors. Test 1. search some authorities 2. click merge, on browser dev console pops reported error message 'Unexpected token u authorities-home.pl...' No way to marge auths 3. with pach applied, merging works again Signed-off-by: Galen Charlton <gmc@esilibrary.com> Created attachment 28501 [details] [review] Bug 12295: fix Javascript error when merging authorities Attempting to merge authorities results in the following error: Uncaught SyntaxError: Unexpected token u authorities-home.pl:284 showMergingInProgress authorities-home.pl:284 (anonymous function) authorities-home.pl:297 o jquery.js:2 p.fireWith jquery.js:2 e.extend.ready jquery.js:2 c.addEventListener.B This was the result of the upgrade of jquery-cookie by the patch for bug 11369; newer versions of jquery-cookie changed the return of $.cookie('foo') from null to undefined when the cookie is not present. Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> No test plan, no errors. Test 1. search some authorities 2. click merge, on browser dev console pops reported error message 'Unexpected token u authorities-home.pl...' No way to marge auths 3. with pach applied, merging works again Signed-off-by: Galen Charlton <gmc@esilibrary.com> Pushed to master. Thanks Kyle! Pushed to 3.16.x for inclusion in 3.16.1. *** Bug 12579 has been marked as a duplicate of this bug. *** Pushed to 3.14.x, will be in 3.14.09 |