[Bug 22602] New: OverDrive circulation integration is broken when user is referred to Koha from another site
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22602 Bug ID: 22602 Summary: OverDrive circulation integration is broken when user is referred to Koha from another site Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: OPAC Assignee: oleonard@myacpl.org Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org Target Milestone: --- To recreate: 1 - Have a working OverDrive account and setup 2 - Put a link to your koha site on another site and follow the link to open Koha in a new tab.window 3 - Do an overdrive search 4 - Note that copies listed as available are correct, however, all items only have a place hold button The issue is in the code below - if we came from an outside site we cannot access p and we 'return' which never instantiates checkout_popup which is needed for creating the checkout buttons later 87 var checkout_popup = null; 88 $( document ).ready(function() { 89 var p = window.opener; 90 if (p) { 91 try { cb = p.refresh_overdrive_account_details;} 92 catch(err){ return; } //Catch error if opener is not accessible 93 if (cb) { 94 cb(); 95 } else { 96 p.location.reload(); 97 } 98 window.close(); 99 } 100 checkout_popup = $("#overdrive-checkout"); 101 $("#overdrive-login-form").submit(function(e){ 102 e.preventDefault(); 103 $("#overdrive-login").modal('hide'); 104 var ODpassword = $("input[name='ODpassword']").val(); 105 login( ODpassword ); 106 }); 107 }); -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22602 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|oleonard@myacpl.org |nick@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22602 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22602 --- Comment #1 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 87352 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=87352&action=edit Bug 22602: Fix OverDrive circulation when coming from another site On bug 21078 we caught an error and returned, this makes us skip some variable setting that we need. This patch moves that code into its own function. To test: 0 - Have OverDrive circulation setup and working 1 - Place a link to your kohadev installation on another site 2 - Follow that link to the opac 3 - Note all items show as 'Place hold' even if available copies 4 - Apply patch 5 - Repeat 1&2 6 - Note the items availability shows correctly -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22602 Liz Rea <wizzyrea@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |wizzyrea@gmail.com --- Comment #2 from Liz Rea <wizzyrea@gmail.com> --- I was having trouble replicating the original problem, does it still happen for you? Liz -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22602 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22602 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #87352|0 |1 is obsolete| | --- Comment #3 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 92501 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=92501&action=edit Bug 22602: Fix OverDrive circulation when coming from another site On bug 21078 we caught an error and returned, this makes us skip some variable setting that we need. This patch moves that code into its own function. To test: 0 - Have OverDrive circulation setup and working 1 - Place a link to your kohadev installation on another site 2 - Follow that link to the opac 3 - Note all items show as 'Place hold' even if available copies 4 - Apply patch 5 - Repeat 1&2 6 - Note the items availability shows correctly Signed-off-by: Elizabeth Quinn <EQuinn@chplnj.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22602 --- Comment #4 from Nick Clemens <nick@bywatersolutions.com> --- (In reply to Liz Rea from comment #2)
I was having trouble replicating the original problem, does it still happen for you?
Liz
Yes, we still have libraries exhibiting this issue -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22602 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Is there any way to test this without an Overdrive account? Or way to get one for testing purposes? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22602 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA CC| |m.de.rooy@rijksmuseum.nl --- Comment #6 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- From: root <root@f1ebe1bec408> You might wanna fix that too ;) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22602 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22602 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #92501|0 |1 is obsolete| | --- Comment #7 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 92633 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=92633&action=edit Bug 22602: Fix OverDrive circulation when coming from another site On bug 21078 we caught an error and returned, this makes us skip some variable setting that we need. This patch moves that code into its own function. To test: 0 - Have OverDrive circulation setup and working 1 - Place a link to your kohadev installation on another site 2 - Follow that link to the opac 3 - Note all items show as 'Place hold' even if available copies 4 - Apply patch 5 - Repeat 1&2 6 - Note the items availability shows correctly Signed-off-by: Elizabeth Quinn <EQuinn@chplnj.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22602 --- Comment #8 from Bouzid Fergani <bouzid.fergani@inlibro.com> --- Created attachment 92821 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=92821&action=edit Bug 23272: (RM followup) Fix failing tests This bug introduced a regression whereby if any authorized value has no branch limitations then the authorized value administration page would fail to display at all. A simple ternary corrects the issue, but I'm now wondering about the logic of returning 'undef' from 'get_branch_limits'.. perhaps an empty (or full) resultset might be a better option to prevent us from requireing ternaries before calling chained methods on such objects. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22602 --- Comment #9 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Bouzid Fergani from comment #8)
Created attachment 92821 [details] [review] Bug 23272: (RM followup) Fix failing tests
This bug introduced a regression whereby if any authorized value has no branch limitations then the authorized value administration page would fail to display at all.
A simple ternary corrects the issue, but I'm now wondering about the logic of returning 'undef' from 'get_branch_limits'.. perhaps an empty (or full) resultset might be a better option to prevent us from requireing ternaries before calling chained methods on such objects.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com>
Bouzid: buy a new keyboard ;) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22602 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #92821|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22602 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22602 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #92633|0 |1 is obsolete| | --- Comment #10 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 93181 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=93181&action=edit Bug 22602: Fix OverDrive circulation when coming from another site On bug 21078 we caught an error and returned, this makes us skip some variable setting that we need. This patch moves that code into its own function. To test: 0 - Have OverDrive circulation setup and working 1 - Place a link to your kohadev installation on another site 2 - Follow that link to the opac 3 - Note all items show as 'Place hold' even if available copies 4 - Apply patch 5 - Repeat 1&2 6 - Note the items availability shows correctly Signed-off-by: Elizabeth Quinn <EQuinn@chplnj.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Looks good to me, but cannot test Overdrive. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22602 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22602 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |19.11.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22602 --- Comment #11 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Nice work! Pushed to master for 19.11.00 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22602 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|19.11.00 |19.11.00,19.05.05 released in| | CC| |fridolin.somers@biblibre.co | |m Status|Pushed to master |Pushed to stable --- Comment #12 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Pushed to 19.05.x for 19.05.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22602 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |21078 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21078 [Bug 21078] Overdrive JS breaks when window opened from another site -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22602 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com Status|Pushed to stable |Pushed to oldstable --- Comment #13 from Lucas Gass <lucas@bywatersolutions.com> --- backported to 18.11.x for 18.11.11 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org