Bug 19214 - Patron clubs: Template process failed: undef error - Cannot use "->find" in list context
Summary: Patron clubs: Template process failed: undef error - Cannot use "->find" in l...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low blocker (vote)
Assignee: Aleisha Amohia
QA Contact: Testopia
URL:
Keywords:
Depends on: 12461 18179
Blocks: 19216
  Show dependency treegraph
 
Reported: 2017-08-30 23:50 UTC by Aleisha Amohia
Modified: 2019-06-27 09:24 UTC (History)
6 users (show)

See Also:
Change sponsored?: Sponsored
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 19214: Prevent error for patron clubs (1.59 KB, patch)
2017-08-30 23:56 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 19214: Prevent error for patron clubs (1.65 KB, patch)
2017-09-06 17:11 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 19214: Prevent crash if ->club or ->patron is called in list context (1.76 KB, patch)
2017-09-07 17:17 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 19214: prevent crash if club_template_field is called in list context (900 bytes, patch)
2017-09-07 17:17 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Aleisha Amohia 2017-08-30 23:50:57 UTC
To reproduce:
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.
Comment 1 Aleisha Amohia 2017-08-30 23:56:34 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
Comment 2 Mark Tompsett 2017-09-06 17:11:20 UTC
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>
Comment 3 Mark Tompsett 2017-09-06 18:58:54 UTC
Upgraded to major, as anyone wishing to use club functionality is affected.
Comment 4 Jonathan Druart 2017-09-07 17:17:01 UTC
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>
Comment 5 Jonathan Druart 2017-09-07 17:17:05 UTC
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>
Comment 6 Jonathan Druart 2017-09-07 18:07:22 UTC
Pushed to master for 17.11, thanks to everybody involved!
Comment 7 Fridolin Somers 2017-09-12 14:57:29 UTC
Pushed to 17.05.x, will be in 17.05.04.
Comment 8 Fridolin Somers 2017-09-12 15:08:45 UTC
In my opinion it would have been better to set a var $ret and return $ret.
Better for debugging for example.
Comment 9 Katrin Fischer 2017-09-16 06:53:54 UTC
No patron clubs feature in 16.11.x