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.
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.
> You may not be able to reproduce the error with plack. I could not in kohadevbox.
I can see the error, trying to sign off.
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>
Thanks a lot Katrin
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>
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>
(In reply to Katrin Fischer from comment #3) > I can see the error, trying to sign off. Same, confirmed!
Upping the severity a bit as Plack is considered stable.
Pushed to master for 17.05, thanks Frido, Jonathan!
These patches have been pushed to 16.11.x and will be in 16.11.08.
Pushed to 3.22.x for 3.22.21
Pushed to 16.05.x, for 16.05.13 release