There is an "Internal server error" inserted into the summary tab of a patron's account when OverDriveCirculation is not enabled.
Created attachment 60588 [details] [review] Bug 18160 - Error when OverDriveCirculation not enabled This patch only executes OverDrive circulation JS if OverDriveCirculation pref is enabled To test: 1 - Disable OverDriveCirculation 2 - Log in to opac and view summary tab 3 - Note 'Internal server error' 4 - Apply patch 5 - Repeat and note error is not present
Created attachment 60589 [details] [review] [SIGNED-OFF] Bug 18160 - Error when OverDriveCirculation not enabled This patch only executes OverDrive circulation JS if OverDriveCirculation pref is enabled To test: 1 - Disable OverDriveCirculation 2 - Log in to opac and view summary tab 3 - Note 'Internal server error' 4 - Apply patch 5 - Repeat and note error is not present Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Created attachment 60590 [details] [review] [SIGNED-OFF] Bug 18160 - Error when OverDriveCirculation not enabled This patch only executes OverDrive circulation JS if OverDriveCirculation pref is enabled To test: 1 - Disable OverDriveCirculation 2 - Log in to opac and view summary tab 3 - Note 'Internal server error' 4 - Apply patch 5 - Repeat and note error is not present Signed-off-by: Srdjan <srdjan@catalyst.net.nz> Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
I did not get an error, but still, fix stands, Overdrive login link should not be shown if Overdrive is not enabled.
(In reply to Srdjan Jankovic from comment #4) > I did not get an error, but still, fix stands, Overdrive login link should > not be shown if Overdrive is not enabled. I did get an error, and this corrects it for me.
It should be noted that I did not have any overdrive system preferences even filled in. I suspect that enabling and disabling would make no difference if you had valid values set up.
I still get Could not compile /home/vagrant/kohaclone/opac/svc/overdrive: Can't locate WebService/ILS/OverDrive/Patron.pm in the logs, why does it not appear in the dependency list?
Why is OverDriveCirculation pass to the template when we should use the TT plugin?
Failing QA because it seems that overdrive.js should not be included if pref is off (ie. shift the IF one line above).
(In reply to Jonathan Druart from comment #7) > I still get > > Could not compile /home/vagrant/kohaclone/opac/svc/overdrive: Can't locate > WebService/ILS/OverDrive/Patron.pm > > in the logs, why does it not appear in the dependency list? Perhaps a follow up is needed to bug 16034?
Created attachment 60622 [details] [review] Bug 18160: Follow up tweak if condition Based on comment #9, moved if condition. Based on comment #8, tweaked condition to grab preference.
Created attachment 60718 [details] [review] Bug 18160 - Error when OverDriveCirculation not enabled This patch only executes OverDrive circulation JS if OverDriveCirculation pref is enabled To test: 1 - Disable OverDriveCirculation 2 - Log in to opac and view summary tab 3 - Note 'Internal server error' 4 - Apply patch 5 - Repeat and note error is not present Signed-off-by: Srdjan <srdjan@catalyst.net.nz> Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 60719 [details] [review] Bug 18160: Follow up tweak if condition Based on comment #9, moved if condition. Based on comment #8, tweaked condition to grab preference. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Pushed to master for 17.05, thanks Nick, Mark!
Depends on bug 16034 which is not in 16.11.x.