Bug 17144

Summary: Fix variable scope issue in edi_accounts.pl (Internal server error with plack)
Product: Koha Reporter: Marc Véron <veron>
Component: Staff ClientAssignee: Marc Véron <veron>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: aleisha, frederic, gmcharlt, katrin.fischer, kyle
Version: unspecified   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17149
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 17144: Fix variable scope issues in edi_account.pl
Bug 17144: Fix variable scope issues in edi_account.pl
[PASSED QA] Bug 17144: Fix variable scope issues in edi_account.pl

Description Marc Véron 2016-08-18 12:00:54 UTC
To reproduce:
- In Staff client, go to Administration > EDI accounts
- Click "+ New account"
Result: Internal Server Error
Plack error log says: 
Can't call method "param" on an undefined value at /home/marc/koha/admin/edi_accounts.pl line 157
Comment 1 Marc Véron 2016-08-18 12:19:13 UTC
Created attachment 54564 [details] [review]
Bug 17144: Fix variable scope issues in edi_account.pl

To reproduce:
- In Staff client, go to Administration > EDI accounts
- Click "+ New account"
Result: Internal Server Error
Plack error log says:
Can't call method "param" on an undefined value at /home/marc/koha/admin/edi_accounts.pl line 157

To test:
-Apply patch
- Add an EDI account
- Edit an EDI account
- Delete an EDI account
Comment 2 Aleisha Amohia 2016-08-22 23:24:56 UTC
I am not able to reproduce the bug. Can you please check?
Comment 3 Marc Véron 2016-08-23 05:26:58 UTC
(In reply to Aleisha Amohia from comment #2)
> I am not able to reproduce the bug. Can you please check?

It is still an issue.

Clicking on "New account" results in "Internal server error"

plack-error.log:

Variable "$schema" is not available at /home/marc/koha/admin/edi_accounts.pl line 147.
Variable "$input" is not available at /home/marc/koha/admin/edi_accounts.pl line 157.
Variable "$schema" is not available at /home/marc/koha/admin/edi_accounts.pl line 159.
Variable "$template" is not available at /home/marc/koha/admin/edi_accounts.pl line 161.
Can't call method "param" on an undefined value at /home/marc/koha/admin/edi_accounts.pl line 157.

Does not happen with patch (after re-starting plack).
Comment 4 Chris Cormack 2016-09-23 20:22:40 UTC
Created attachment 55786 [details] [review]
Bug 17144: Fix variable scope issues in edi_account.pl

To reproduce:
- In Staff client, go to Administration > EDI accounts
- Click "+ New account"
Result: Internal Server Error
Plack error log says:
Can't call method "param" on an undefined value at /home/marc/koha/admin/edi_accounts.pl line 157

To test:
-Apply patch
- Add an EDI account
- Edit an EDI account
- Delete an EDI account

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Comment 5 Katrin Fischer 2016-09-25 16:17:49 UTC
Not sure if this is the best long term solution, but it works nicely now under Plack :)
Comment 6 Katrin Fischer 2016-09-25 16:19:22 UTC
Created attachment 55800 [details] [review]
[PASSED QA] Bug 17144: Fix variable scope issues in edi_account.pl

To reproduce:
- In Staff client, go to Administration > EDI accounts
- Click "+ New account"
Result: Internal Server Error
Plack error log says:
Can't call method "param" on an undefined value at /home/marc/koha/admin/edi_accounts.pl line 157

To test:
-Apply patch
- Add an EDI account
- Edit an EDI account
- Delete an EDI account

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Signed-off-by: Katrin Fischer  <katrin.fischer@bsz-bw.de>
Comment 7 Kyle M Hall 2016-09-27 10:41:46 UTC
Pushed to master for 16.11, thanks Marc!
Comment 8 Frédéric Demians 2016-09-30 08:19:59 UTC
Pushed in 16.05. Will be in 16.05.05.