[Bug 42582] New: Uncaught TypeError when no z39.50 service is set
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42582 Bug ID: 42582 Summary: Uncaught TypeError when no z39.50 service is set Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: trivial Priority: P5 - low Component: ILL Assignee: koha-bugs@lists.koha-community.org Reporter: bibliothek@th-wildau.de QA Contact: testopia@bugs.koha-community.org CC: lisette@bywatersolutions.com, pedro.amorim@openfifth.co.uk, tomascohen@gmail.com to recreate: - start a ktd instance with a plugin that offers an ill_availability_services hook f.e. https://github.com/openfifth/koha-plugin-ill-avail-z3950 ktd --proxy --name main --single-plugin ~/git/koha-plugins/koha-plugin-ill-avail-z3950-master/ up -d ktd --name main --shell restart_all - login and configure plugin open http://main-intra.localhost/cgi-bin/koha/plugins/plugins-home.pl check one of the z39.50 targets and do not check 'Display results when making partner requests: ' <- this is where the bug is triggered enter partner id: 16 - edit a ILL patron and set an Primary email adress: http://main-intra.localhost/cgi-bin/koha/members/moremember.pl?borrowernumbe... - enable ILLModule and ILLCheckAvailability http://main-intra.localhost/cgi-bin/koha/admin/preferences.pl?tab=interlibra... ILLModule: 'enable' ILLCheckAvailability: 'check' - create an ILL request: http://main-intra.localhost/cgi-bin/koha/ill/ill-requests.pl?method=create&backend=Standard - on the following page open dev tools (F12 on Firefox) click 'Place request with partner libraries' - check error in console Uncaught TypeError: can't access property "enabled", services[0] is undefined The reason is a call for a property on a none existant services object in koha-tmpl/intranet-tmpl/prog/js/ill-availability-partner.js in function isEnabled -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42582 Jan Kissig <bibliothek@th-wildau.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Uncaught TypeError when no |Uncaught TypeError on Place |z39.50 service is set |request with partner | |libraries when no z39.50 | |service is set -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42582 Jan Kissig <bibliothek@th-wildau.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |bibliothek@th-wildau.de |ity.org | Patch complexity|--- |String patch Status|NEW |Needs Signoff -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42582 --- Comment #1 from Jan Kissig <bibliothek@th-wildau.de> --- Created attachment 199065 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=199065&action=edit Bug 42582: Fix Uncaught TypeError on 'Place request with partner libraries' This patch fixes an Uncaught TypeError on Place request with partner libraries (op=generic_confirm) when at least one partner library is available (primary email is set) and system preference ILLCheckAvailability is enabled. Reason for this is an undefined object services. Test plan: a) start a ktd instance ktd --proxy --name main up -d b) enable system preference ILLModule and ILLCheckAvailability http://main-intra.localhost/cgi-bin/koha/admin/preferences.pl?tab=interlibra... ILLModule: 'enable' ILLCheckAvailability: 'check' c) edit an ILL patron and set an Primary email address: http://main-intra.localhost/cgi-bin/koha/members/moremember.pl?borrowernumbe... (Walker) d) create an ill request (Interlibrary loans -> (Requests) -> New ILL request) and fill out mandatory data e) open dev tools (F12 on Firefox) and go to 'Place requests with partners' f) notice console error: Uncaught TypeError: can't access property "enabled", services[0] is undefined g) apply patch and reload page 'Place requests with partners' -> no error -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42582 David Nind <david@davidnind.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=42582 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #199065|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=42582 --- Comment #2 from David Nind <david@davidnind.com> --- Created attachment 199168 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=199168&action=edit Bug 42582: Fix Uncaught TypeError on 'Place request with partner libraries' This patch fixes an Uncaught TypeError on Place request with partner libraries (op=generic_confirm) when at least one partner library is available (primary email is set) and system preference ILLCheckAvailability is enabled. Reason for this is an undefined object services. Test plan: a) start a ktd instance ktd --proxy --name main up -d b) enable system preference ILLModule and ILLCheckAvailability http://main-intra.localhost/cgi-bin/koha/admin/preferences.pl?tab=interlibra... ILLModule: 'enable' ILLCheckAvailability: 'check' c) edit an ILL patron and set an Primary email address: http://main-intra.localhost/cgi-bin/koha/members/moremember.pl?borrowernumbe... (Walker) d) create an ill request (Interlibrary loans -> (Requests) -> New ILL request) and fill out mandatory data e) open dev tools (F12 on Firefox) and go to 'Place requests with partners' f) notice console error: Uncaught TypeError: can't access property "enabled", services[0] is undefined g) apply patch and reload page 'Place requests with partners' -> no error Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42582 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com --- Comment #3 from David Nind <david@davidnind.com> --- Testing notes (using KTD): 1. After applying the patch: - yarn build - restart_all -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42582 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA QA Contact|testopia@bugs.koha-communit |jonathan.druart@gmail.com |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42582 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #199168|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=42582 --- Comment #4 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 200751 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200751&action=edit Bug 42582: Fix Uncaught TypeError on 'Place request with partner libraries' This patch fixes an Uncaught TypeError on Place request with partner libraries (op=generic_confirm) when at least one partner library is available (primary email is set) and system preference ILLCheckAvailability is enabled. Reason for this is an undefined object services. Test plan: a) start a ktd instance ktd --proxy --name main up -d b) enable system preference ILLModule and ILLCheckAvailability http://main-intra.localhost/cgi-bin/koha/admin/preferences.pl?tab=interlibra... ILLModule: 'enable' ILLCheckAvailability: 'check' c) edit an ILL patron and set an Primary email address: http://main-intra.localhost/cgi-bin/koha/members/moremember.pl?borrowernumbe... (Walker) d) create an ill request (Interlibrary loans -> (Requests) -> New ILL request) and fill out mandatory data e) open dev tools (F12 on Firefox) and go to 'Place requests with partners' f) notice console error: Uncaught TypeError: can't access property "enabled", services[0] is undefined g) apply patch and reload page 'Place requests with partners' -> no error Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42582 Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |26.11.00 released in| | Status|Passed QA |Pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42582 --- Comment #5 from Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> --- Thanks everyone! Pushed to main for 26.11! -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org