[Koha-bugs] [Bug 36368] Cannot save new patron after error

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Mar 21 15:45:54 CET 2024


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

--- Comment #7 from Laura Escamilla <Laura.escamilla at bywatersolutions.com> ---
Created attachment 163625
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=163625&action=edit
Bug 36368: Declare template param "op" after variable $op is set

If an error occurs while adding new patron, after fixing the error and
hitting save, patron entry page reloads to "Modify patron" section
and error "Patron not found. Return to search" is displayed. But no
patron is saved.

This happens because we declare template param op too early in the
code and it receives value "cud-insert" instead of "add_form" as it should.

To test:
1. Add new patron and cause an error (wrong age etc.).
2. Attempt to save patron, error message is displayed.
3. Fix your errors and attempt to save again.
=> Error message "Patron not found. Return to search" is displayed and new
patron is not saved to database.
4. Apply this patch.
5. Repeat steps from 1 to 3.
=> Saving patron should now work.
=> To be save, test if modifying patron also works as it should.

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Laura Escamilla <laura.escamilla at bywatersolutions.com>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list