Summary: | Patron clubs: Template process failed: undef error - Cannot use "->find" in list context | ||
---|---|---|---|
Product: | Koha | Reporter: | Aleisha Amohia <aleisha> |
Component: | Patrons | Assignee: | Aleisha Amohia <aleisha> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | blocker | ||
Priority: | P5 - low | CC: | fridolin.somers, gmcharlt, jonathan.druart, kyle.m.hall, mtompset |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18870 | ||
Change sponsored?: | Sponsored | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Bug Depends on: | 12461, 18179 | ||
Bug Blocks: | 19216 | ||
Attachments: |
Bug 19214: Prevent error for patron clubs
Bug 19214: Prevent error for patron clubs Bug 19214: Prevent crash if ->club or ->patron is called in list context Bug 19214: prevent crash if club_template_field is called in list context |
Description
Aleisha Amohia
2017-08-30 23:50:57 UTC
Created attachment 66661 [details] [review] Bug 19214: Prevent error for patron clubs To test: 1) Create a club template and a club. 2) Add a user to the club 3) Log in to the OPAC as that user 4) Go to 'your summary' and click the Clubs tab 5) Notice clubs do not load and a warn shows: Template process failed: undef error - Cannot use "->find" in list context at /home/vagrant/kohaclone/Koha/Club/Enrollment.pm line 62. 6) Go to the staff side and go to the member page of that user 7) Go to 'details' and click the Clubs tab 8) Notice clubs do not load and a warn shows: Template process failed: undef error - Cannot use "->find" in list context at /home/vagrant/kohaclone/Koha/Club/Enrollment.pm line 71. 9) Apply patch 1) Repeat steps 4-7, confirming the errors do not show and clubs info loads correctly Sponsored-by: Catalyst IT Created attachment 66895 [details] [review] Bug 19214: Prevent error for patron clubs To test: 1) Create a club template and a club. 2) Add a user to the club 3) Log in to the OPAC as that user 4) Go to 'your summary' and click the Clubs tab 5) Notice clubs do not load and a warn shows: Template process failed: undef error - Cannot use "->find" in list context at /home/vagrant/kohaclone/Koha/Club/Enrollment.pm line 62. 6) Go to the staff side and go to the member page of that user 7) Go to 'details' and click the Clubs tab 8) Notice clubs do not load and a warn shows: Template process failed: undef error - Cannot use "->find" in list context at /home/vagrant/kohaclone/Koha/Club/Enrollment.pm line 71. 9) Apply patch 1) Repeat steps 4-7, confirming the errors do not show and clubs info loads correctly Sponsored-by: Catalyst IT Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Upgraded to major, as anyone wishing to use club functionality is affected. Created attachment 66954 [details] [review] Bug 19214: Prevent crash if ->club or ->patron is called in list context To test: 1) Create a club template and a club. 2) Add a user to the club 3) Log in to the OPAC as that user 4) Go to 'your summary' and click the Clubs tab 5) Notice clubs do not load and a warn shows: Template process failed: undef error - Cannot use "->find" in list context at /home/vagrant/kohaclone/Koha/Club/Enrollment.pm line 62. 6) Go to the staff side and go to the member page of that user 7) Go to 'details' and click the Clubs tab 8) Notice clubs do not load and a warn shows: Template process failed: undef error - Cannot use "->find" in list context at /home/vagrant/kohaclone/Koha/Club/Enrollment.pm line 71. 9) Apply patch 1) Repeat steps 4-7, confirming the errors do not show and clubs info loads correctly Sponsored-by: Catalyst IT Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Created attachment 66955 [details] [review] Bug 19214: prevent crash if club_template_field is called in list context Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Pushed to master for 17.11, thanks to everybody involved! Pushed to 17.05.x, will be in 17.05.04. In my opinion it would have been better to set a var $ret and return $ret. Better for debugging for example. No patron clubs feature in 16.11.x |