[Bug 12320] New: $.cookie('foo', null) deprecated
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12320 Bug ID: 12320 Summary: $.cookie('foo', null) deprecated Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: gmcharlt@gmail.com Reporter: gmcharlt@gmail.com QA Contact: testopia@bugs.koha-community.org With the upgrade of jquery-cookie to the latest version (see bug 11369), the following construct to delete a cookie is no longer supported: $.cookie('foo', null) Instead, per https://github.com/carhartl/jquery-cookie/blob/master/CHANGELOG.md, it should now be $.removeCookie('foo'); There is at least one direct use of the deprecated construct: koha-tmpl/intranet-tmpl/prog/en/js/pages/batchMod.js: $.cookie("showColumns",null); and possibly others: koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js: $.cookie("holdfor",null, { path: "/", expires: 0 }); koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt: $.cookie("holdfor",null, { path: "/", expires: 0 }); koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt:[% IF ( borrowernumber ) %]if($.cookie("holdfor") != [% borrowernumber %]){ $.cookie("holdfor",null, { path: "/", expires: 0 }); }[% ELSE %]$.cookie("holdfor",null, { path: "/", expires: 0 });[% END %] -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12320 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12320 --- Comment #1 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 38600 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=38600&action=edit Bug 12320: Remove deprecated construct to delete cookie holdfor $.cookie('foo', null); is deprecated and should be replaced with $.removeCookie('foo'); This patch replaces the occurrences for the "holdfor" cookie. Test plan: 1/ Search for a patron 2/ On the patron detail page, click on "search to hold" 3/ Search for records 4/ On the results page, click on "Place hold" > "Forget PATRON" 5/ Reload the page. 6/ The "Place hold" button should not contain the patron anymore -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12320 --- Comment #2 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 38601 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=38601&action=edit Bug 12320: Remove deprecated construct to delete cookie showColumns $.cookie('foo', null); is deprecated and should be replaced with $.removeCookie('foo'); This patch replaces the occurrences for the "showColumns" cookie. Before this patch, there was a bug on the batchmod tools. To reproduce the issue: 1/ Go on the Batch item modification tool 2/ Fill the textarea with barcodes and submit 3/ Click on some column names (to create the cookie) 4/ Click on 'Show all columns" (to set the cookie to null) 5/ Don't submit and repeat steps 1 & 2 6/ You should see a js error: Error: Syntax error, unrecognized expression: :nth-child ...break;q=a}return s},m.error=function(a){throw new Error("Syntax error, unrecogni... Test plan: Confirm the issue has gone away and there is no regression on the column selection -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12320 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@biblibre.co | |m Assignee|gmcharlt@gmail.com |jonathan.druart@biblibre.co | |m Severity|minor |normal -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12320 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #38600|0 |1 is obsolete| | --- Comment #3 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- Created attachment 39367 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=39367&action=edit [SIGNED-OFF] Bug 12320: Remove deprecated construct to delete cookie holdfor $.cookie('foo', null); is deprecated and should be replaced with $.removeCookie('foo'); This patch replaces the occurrences for the "holdfor" cookie. Test plan: 1/ Search for a patron 2/ On the patron detail page, click on "search to hold" 3/ Search for records 4/ On the results page, click on "Place hold" > "Forget PATRON" 5/ Reload the page. 6/ The "Place hold" button should not contain the patron anymore Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Works as described, no errors -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12320 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #38601|0 |1 is obsolete| | --- Comment #4 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- Created attachment 39368 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=39368&action=edit [SIGNED-OFF] Bug 12320: Remove deprecated construct to delete cookie showColumns $.cookie('foo', null); is deprecated and should be replaced with $.removeCookie('foo'); This patch replaces the occurrences for the "showColumns" cookie. Before this patch, there was a bug on the batchmod tools. To reproduce the issue: 1/ Go on the Batch item modification tool 2/ Fill the textarea with barcodes and submit 3/ Click on some column names (to create the cookie) 4/ Click on 'Show all columns" (to set the cookie to null) 5/ Don't submit and repeat steps 1 & 2 6/ You should see a js error: Error: Syntax error, unrecognized expression: :nth-child ...break;q=a}return s},m.error=function(a){throw new Error("Syntax error, unrecogni... Test plan: Confirm the issue has gone away and there is no regression on the column selection Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> No js error, no regressions, no errors -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12320 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |bgkriegel@gmail.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12320 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=12320 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #39367|0 |1 is obsolete| | Attachment #39368|0 |1 is obsolete| | --- Comment #5 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 39424 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=39424&action=edit [PASSED QA] Bug 12320: Remove deprecated construct to delete cookie holdfor $.cookie('foo', null); is deprecated and should be replaced with $.removeCookie('foo'); This patch replaces the occurrences for the "holdfor" cookie. Test plan: 1/ Search for a patron 2/ On the patron detail page, click on "search to hold" 3/ Search for records 4/ On the results page, click on "Place hold" > "Forget PATRON" 5/ Reload the page. 6/ The "Place hold" button should not contain the patron anymore Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Works as described, no errors Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12320 --- Comment #6 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 39425 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=39425&action=edit [PASSED QA] Bug 12320: Remove deprecated construct to delete cookie showColumns $.cookie('foo', null); is deprecated and should be replaced with $.removeCookie('foo'); This patch replaces the occurrences for the "showColumns" cookie. Before this patch, there was a bug on the batchmod tools. To reproduce the issue: 1/ Go on the Batch item modification tool 2/ Fill the textarea with barcodes and submit 3/ Click on some column names (to create the cookie) 4/ Click on 'Show all columns" (to set the cookie to null) 5/ Don't submit and repeat steps 1 & 2 6/ You should see a js error: Error: Syntax error, unrecognized expression: :nth-child ...break;q=a}return s},m.error=function(a){throw new Error("Syntax error, unrecogni... Test plan: Confirm the issue has gone away and there is no regression on the column selection Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> No js error, no regressions, no errors Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12320 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |12777 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12320 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #7 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- *** Bug 12777 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12320 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |tomascohen@gmail.com --- Comment #8 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Patches pushed to master. Thanks Jonathan! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12320 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |chris@bigballofwax.co.nz Status|Pushed to Master |Pushed to Stable --- Comment #9 from Chris Cormack <chris@bigballofwax.co.nz> --- Pushed to 3.20.x will be in 3.20.1 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12320 Liz Rea <wizzyrea@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |wizzyrea@gmail.com --- Comment #10 from Liz Rea <wizzyrea@gmail.com> --- Hi, This patch does not apply cleanly to 3.18.x, if you feel it should be included, please rebase for 3.18.x. Cheers, Liz -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org