https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16996

Nick Clemens <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #54175|0                           |1
        is obsolete|                            |

--- Comment #9 from Nick Clemens <[email protected]> ---
Created attachment 54396
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54396&action=edit
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 <[email protected]>

Signed-off-by: Marc <[email protected]>

Signed-off-by: Nick Clemens <[email protected]>

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to