Description
Owen Leonard
2021-02-04 13:50:51 UTC
More details: Apparently the problem only occurs if PatronSelfRegistrationVerifyByEmail is turned on. Created attachment 116329 [details] [review] Bug 27626: Fix self registration if categorycode is hidden and PatronSelfRegistrationVerifyByEmail If categorycode is selected in PatronSelfRegistrationBorrowerUnwantedField and PatronSelfRegistrationVerifyByEmail is turned on, the patron self registration fails with [You must provide a patron's category to validate password's strength and length] at /usr/share/perl5/Exception/Class/Base.pm line 88 Test plan: 0. Select categorycode in PatronSelfRegistrationBorrowerUnwantedField and turn on PatronSelfRegistrationVerifyByEmail 1. Self register a patron 2. Confirm that it works as expected with this patch applied. Is the self registration feature supposed to work if there is no default category defined (PatronSelfRegistrationDefaultCategory)? The "register here" link is not displayed, but the opac-memberentry.pl is not returning a 404, and the code is trying (badly) to deal with this situation. If the feature must be turned off if the default cat is not defined, then maybe we should force categorycode in PatronSelfRegistrationBorrowerUnwantedField, and always use the default when a new patron is self-registered. Created attachment 116617 [details] [review] Bug 27626: Fix self registration if categorycode is hidden and PatronSelfRegistrationVerifyByEmail If categorycode is selected in PatronSelfRegistrationBorrowerUnwantedField and PatronSelfRegistrationVerifyByEmail is turned on, the patron self registration fails with [You must provide a patron's category to validate password's strength and length] at /usr/share/perl5/Exception/Class/Base.pm line 88 Test plan: 0. Select categorycode in PatronSelfRegistrationBorrowerUnwantedField and turn on PatronSelfRegistrationVerifyByEmail 1. Self register a patron 2. Confirm that it works as expected with this patch applied. Signed-off-by: Owen Leonard <oleonard@myacpl.org> I tried to test this, but ran into bug 27710 and then into: Invalid 'from' parameter: root@localhost at /usr/share/perl5/Exception/Class/Base.pm line 88 KohAdminEmailAdress is filled, but my system not set up to sent email. Any ideas? try: root@example.org Hm, I already tried root@localhost and katrin@something.de so both syntax. Is there some special magic about the one you suggested? And is KohaAdminEmailAddress the one it shoud go into? (In reply to Katrin Fischer from comment #7) > Hm, I already tried root@localhost and katrin@something.de so both syntax. > Is there some special magic about the one you suggested? And is > KohaAdminEmailAddress the one it shoud go into? katrin@something.de should work, please try again. I've set all the email prefs to katrin@something.de and it doesn't change the error message: Invalid 'from' parameter: root@localhost at /usr/share/perl5/Exception/Class/Base.pm line 88 I believe it might be related to the SMTP configuration, but I am not sure how to set that up on a devbox. Katrin, here is what I did: % git checkout -b bug_27626 origin/master % git bz apply 27626 % reset_all 1. PatronSelfRegistrationVerifyByEmail => require 2. PatronSelfRegistrationBorrowerUnwantedField => categorycode 3. KohaAdminEmailAddress => root@example.org 4. /cgi-bin/koha/opac-memberentry.pl "A confirmation email will be sent shortly to the email address xxx@example.org." (In reply to Katrin Fischer from comment #9) > I've set all the email prefs to katrin@something.de and it doesn't change > the error message: > > Invalid 'from' parameter: root@localhost at > /usr/share/perl5/Exception/Class/Base.pm line 88 > > I believe it might be related to the SMTP configuration, but I am not sure > how to set that up on a devbox. No it's not, the error you get is coming from KohaAdminEmailAddress. (In reply to Jonathan Druart from comment #11) > (In reply to Katrin Fischer from comment #9) > > I've set all the email prefs to katrin@something.de and it doesn't change > > the error message: > > > > Invalid 'from' parameter: root@localhost at > > /usr/share/perl5/Exception/Class/Base.pm line 88 > > > > I believe it might be related to the SMTP configuration, but I am not sure > > how to set that up on a devbox. > > No it's not, the error you get is coming from KohaAdminEmailAddress. But my KohaAdminEmailAddress was not set to root@localhost - I tried it various times. Maybe someoen else has to take that one. Created attachment 117177 [details] [review] Bug 27626: Fix self registration if categorycode is hidden and PatronSelfRegistrationVerifyByEmail If categorycode is selected in PatronSelfRegistrationBorrowerUnwantedField and PatronSelfRegistrationVerifyByEmail is turned on, the patron self registration fails with [You must provide a patron's category to validate password's strength and length] at /usr/share/perl5/Exception/Class/Base.pm line 88 Test plan: 0. Select categorycode in PatronSelfRegistrationBorrowerUnwantedField and turn on PatronSelfRegistrationVerifyByEmail 1. Self register a patron 2. Confirm that it works as expected with this patch applied. Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> The patch works well for me and the caveats are livable. Passing QA Pushed to master for 21.05, thanks to everybody involved! Pushed to 20.11.x for 20.11.04 Pushed to 20.05.x for 20.05.10 Backported: Pushed to 19.11.x branch for 19.11.16 |