Bug 17144 - Fix variable scope issue in edi_accounts.pl (Internal server error with plack)
Summary: Fix variable scope issue in edi_accounts.pl (Internal server error with plack)
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Staff interface (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low normal (vote)
Assignee: Marc Véron
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-18 12:00 UTC by Marc Véron
Modified: 2017-12-07 22:16 UTC (History)
5 users (show)

See Also:
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 (1.42 KB, patch)
2016-08-18 12:19 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 17144: Fix variable scope issues in edi_account.pl (1.48 KB, patch)
2016-09-23 20:22 UTC, Chris Cormack
Details | Diff | Splinter Review
[PASSED QA] Bug 17144: Fix variable scope issues in edi_account.pl (1.55 KB, patch)
2016-09-25 16:19 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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.