Bug 18376 - authority framework creation fails under Plack
Summary: authority framework creation fails under Plack
Status: Pushed to Stable
Alias: None
Product: Koha
Classification: Unclassified
Component: System Administration (show other bugs)
Version: master
Hardware: All All
: P5 - low major (vote)
Assignee: Fridolin SOMERS
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-04 07:22 UTC by Fridolin SOMERS
Modified: 2017-05-24 03:10 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 18376 - authority framework creation fails under Plack (2.77 KB, patch)
2017-04-04 12:24 UTC, Fridolin SOMERS
Details | Diff | Splinter Review
[SIGNED OFF] Bug 18376 - authority framework creation fails under Plack (2.84 KB, patch)
2017-05-12 06:07 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 18376 - authority framework creation fails under Plack (2.91 KB, patch)
2017-05-18 19:45 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 18376: Do not need to prepare a single statement, use do (1.55 KB, patch)
2017-05-18 19:45 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 Fridolin SOMERS 2017-04-04 07:22:30 UTC
With plack, when creating a new authority framework from another, you get the error :
Can't call method "prepare" on an undefined value at (...)/src/admin/auth_tag_structure.pl line 267.
Comment 1 Fridolin SOMERS 2017-04-04 12:24:52 UTC
Created attachment 61817 [details] [review]
Bug 18376 - authority framework creation fails under Plack

With plack, when creating a new authority framework from another, you get the error :
Can't call method "prepare" on an undefined value at (...)/src/admin/auth_tag_structure.pl line 267.

Looks like plack does not like when the var $dbh from the script is called inside a sub.

This patch adds a local var $dbh inside sub duplicate_auth_framework(), like in sub StringSearch().

Also correctes a redefine of my $sth.

Test plan:
- Go to Administration > Authority types
- Create a new type
- On this new type click on Actions > MARC Structure
- Select another type and click OK
=> You must get a table filled with the tag structure
Check with and without plack
You may not be able to reproduce the error with plack.
Comment 2 Owen Leonard 2017-05-10 14:45:32 UTC
> You may not be able to reproduce the error with plack.

I could not in kohadevbox.
Comment 3 Katrin Fischer 2017-05-12 06:04:17 UTC
I can see the error, trying to sign off.
Comment 4 Katrin Fischer 2017-05-12 06:07:17 UTC
Created attachment 63401 [details] [review]
[SIGNED OFF] Bug 18376 - authority framework creation fails under Plack

With plack, when creating a new authority framework from another, you get the error :
Can't call method "prepare" on an undefined value at (...)/src/admin/auth_tag_structure.pl line 267.

Looks like plack does not like when the var $dbh from the script is called inside a sub.

This patch adds a local var $dbh inside sub duplicate_auth_framework(), like in sub StringSearch().

Also correctes a redefine of my $sth.

Test plan:
- Go to Administration > Authority types
- Create a new type
- On this new type click on Actions > MARC Structure
- Select another type and click OK
=> You must get a table filled with the tag structure
Check with and without plack
You may not be able to reproduce the error with plack.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 5 Fridolin SOMERS 2017-05-16 15:08:52 UTC
Thanks a lot Katrin
Comment 6 Jonathan Druart 2017-05-18 19:45:18 UTC
Created attachment 63544 [details] [review]
Bug 18376 - authority framework creation fails under Plack

With plack, when creating a new authority framework from another, you get the error :
Can't call method "prepare" on an undefined value at (...)/src/admin/auth_tag_structure.pl line 267.

Looks like plack does not like when the var $dbh from the script is called inside a sub.

This patch adds a local var $dbh inside sub duplicate_auth_framework(), like in sub StringSearch().

Also correctes a redefine of my $sth.

Test plan:
- Go to Administration > Authority types
- Create a new type
- On this new type click on Actions > MARC Structure
- Select another type and click OK
=> You must get a table filled with the tag structure
Check with and without plack
You may not be able to reproduce the error with plack.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 7 Jonathan Druart 2017-05-18 19:45:23 UTC
Created attachment 63545 [details] [review]
Bug 18376: Do not need to prepare a single statement, use do

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 8 Jonathan Druart 2017-05-18 19:46:08 UTC
(In reply to Katrin Fischer from comment #3)
> I can see the error, trying to sign off.

Same, confirmed!
Comment 9 Jonathan Druart 2017-05-18 19:46:35 UTC
Upping the severity a bit as Plack is considered stable.
Comment 10 Kyle M Hall 2017-05-19 13:54:33 UTC
Pushed to master for 17.05, thanks Frido, Jonathan!
Comment 11 Katrin Fischer 2017-05-21 20:58:15 UTC
These patches have been pushed to 16.11.x and will be in 16.11.08.
Comment 12 Julian Maurice 2017-05-22 08:14:09 UTC
Pushed to 3.22.x for 3.22.21
Comment 13 Mason James 2017-05-24 03:10:48 UTC
Pushed to 16.05.x, for 16.05.13 release