Bug 18535 - Clicking 'edit printer profile' in label creator causes software error
authorNick Clemens <nick@bywatersolutions.com>
Wed, 3 May 2017 20:43:22 +0000 (16:43 -0400)
committerJulian Maurice <julian.maurice@biblibre.com>
Mon, 22 May 2017 10:42:24 +0000 (12:42 +0200)
1) Go to Tools > Label creator
2) If you don't have a printer profile defined, create one.
3) Go to manage > Printer profiles
4) Click the 'edit' button on any of the profiles.
5) INTERNAL SERVER ERROR! "Can't use string ("fields") as a HASH ref
while "strict refs" in use at /usr/share/koha/lib/C4/Creators/Lib.pm
line 147"
6) Apply patch
7) Click the 'edit' button on any of the profiles.
8) Things work as expected

Bug reproduced, is fixed by this patch
Signed-off-by: Marc VĂ©ron <veron@veron.ch>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit af845c143a4f5a8fb1ea88cac3478ef91a1bdb9c)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(cherry picked from commit 36e7e213fa4b1252b43fc402b238d8c835821995)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

labels/label-edit-profile.pl

index 13c9aaf..e5ed353 100755 (executable)
@@ -50,7 +50,7 @@ my $units = get_unit_values();
 
 if ($op eq 'edit') {
     $profile = C4::Labels::Profile->retrieve(profile_id => $profile_id);
-    $template_list = get_all_templates( fields => [ qw( template_id template_code profile_id) ] );
+    $template_list = get_all_templates( { fields => [ qw( template_id template_code profile_id) ] } );
 }
 elsif ($op eq 'save') {
     my @params = (