Bugzilla – Attachment 164111 Details for
Bug 36368
Cannot save new patron after error
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36368: Declare template param "op" after variable $op is set
Bug-36368-Declare-template-param-op-after-variable.patch (text/plain), 2.16 KB, created by
Marcel de Rooy
on 2024-03-29 08:27:03 UTC
(
hide
)
Description:
Bug 36368: Declare template param "op" after variable $op is set
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2024-03-29 08:27:03 UTC
Size:
2.16 KB
patch
obsolete
>From 02118a7cb7634acbc79b6e6df0808951edf7f2f4 Mon Sep 17 00:00:00 2001 >From: Emmi Takkinen <emmi.takkinen@koha-suomi.fi> >Date: Wed, 20 Mar 2024 15:33:21 +0200 >Subject: [PATCH] Bug 36368: Declare template param "op" after variable $op is > set >Content-Type: text/plain; charset=utf-8 > >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@bywatersolutions.com> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > members/memberentry.pl | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > >diff --git a/members/memberentry.pl b/members/memberentry.pl >index 6c43b3db46..c2e6edfdbe 100755 >--- a/members/memberentry.pl >+++ b/members/memberentry.pl >@@ -163,7 +163,6 @@ foreach (@field_check) { > next unless m/\w/o; > $template->param( "no$_" => 1 ); > } >-$template->param( "op" => $op ); > $template->param( "quickadd" => 1 ) if ( $quickadd ); > $template->param( "duplicate" => 1 ) if ( $op eq 'duplicate' ); > $template->param( "checked" => 1 ) if ( defined($nodouble) && $nodouble eq 1 ); >@@ -607,6 +606,9 @@ if ($nok or !$nodouble){ > $template->param( step_1 => 1,step_2 => 1,step_3 => 1, step_4 => 1, step_5 => 1, step_6 => 1, step_7 => 1 ); > } > } >+ >+$template->param( "op" => $op ); >+ > if (C4::Context->preference("IndependentBranches")) { > my $userenv = C4::Context->userenv; > if ( !C4::Context->IsSuperLibrarian() && $data{'branchcode'} ) { >-- >2.30.2
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 36368
:
163526
|
163624
|
163625
| 164111 |
164112