Bugzilla – Attachment 54011 Details for
Bug 16996
Template process failed: undef error - Can't call method "description"
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16996: Do not explode if mandatory fields are missing
Bug-16996-Do-not-explode-if-mandatory-fields-are-m.patch (text/plain), 1.97 KB, created by
Mark Tompsett
on 2016-08-04 20:25:24 UTC
(
hide
)
Description:
Bug 16996: Do not explode if mandatory fields are missing
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2016-08-04 20:25:24 UTC
Size:
1.97 KB
patch
obsolete
>From a4ae526dca63fa4901d673b499a14b54697b5f10 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 3 Aug 2016 16:28:24 +0100 >Subject: [PATCH] Bug 16996: Do not explode if mandatory fields are missing > >At the OPAC, if a patron modify his/her information and at least 1 >mandatory field is missing, Koha will crash with > Template process failed: undef error - Can't call method "description" > >It is raised by Koha::Template::Plugin::Categories::GetName called with >an undefined categorycode. >The problem is that the values sent originaly are not sent back to the >template if the user missed something. >This patch makes that all info are resent to the template in order to >show the same form to the user. > >Test plan: >0. Apply patch > >1. Make sure that the categorycode is not hidden in the OPAC in: > PatronSelfRegistrationBorrowerUnwantedField or PatronSelfModificationBorrowerUnwantedField > >2. Add a required field in PatronSelfRegistrationBorrowerMandatoryField, for example email. > >3. Go to Your Personal Details in the OPAC (opac-memberentry.pl) and leave blank the required field of point 2 > >4. Press "Submit update request" > >There should be no software error. > >NOTE: The warns will be floody on the logs. > >Signed-off-by: Mark Tompsett <mtompset@hotmail.com> >--- > opac/opac-memberentry.pl | 4 ++++ > 1 file changed, 4 insertions(+) > >diff --git a/opac/opac-memberentry.pl b/opac/opac-memberentry.pl >index b73ee1b..4e01be5 100755 >--- a/opac/opac-memberentry.pl >+++ b/opac/opac-memberentry.pl >@@ -191,6 +191,10 @@ elsif ( $action eq 'update' ) { > CheckMandatoryFields( \%borrower_changes, $action ); > my $invalidformfields = CheckForInvalidFields(\%borrower); > >+ use Data::Dumper;warn Dumper $borrower; >+ %borrower = ( %$borrower, %borrower ); >+ use Data::Dumper;warn Dumper \%borrower; >+ > if (@empty_mandatory_fields || @$invalidformfields) { > $template->param( > empty_mandatory_fields => \@empty_mandatory_fields, >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 16996
:
53959
|
54011
|
54148
|
54167
|
54175
|
54176
|
54396
|
54397
|
54947