When trying to edit user with utf-8 characters in one of user-editable fields we get following error: Software error: Wide character in subroutine entry at /usr/share/perl5/Mail/Sendmail.pm line 308.
Created attachment 12995 [details] [review] Bug 8953 - opac-userupdate encoding issues This script has various encoding problems: 1. parametars from CGI are not encoded in utf-8, so when they are compared with utf-8 strings from database every field with utf-8 characters will be reported in e-mail as changed 2. when sending e-mail, wide characters are passed to Mail::Sendmail which results in software error if edited field has utf-8 characters (because of first point, this happend if ANY fields has utf-8 chars) 3. when declaring encoding for outgoing e-mail utf-8 is more correct than just utf8 Test scenario: 1. open opac-userupdate and edit user which has utf-8 characters in at least one field (firstname and surname are common examples) 2. edit one of other fields and add utf-8 character to it 3. verify that e-mail with changes arrived with just edited field
Created attachment 12996 [details] [review] Bug 8953 - opac-userupdate encoding issues This script has various encoding problems: 1. parametars from CGI are not encoded in utf-8, so when they are compared with utf-8 strings from database every field with utf-8 characters will be reported in e-mail as changed 2. when sending e-mail, wide characters are passed to Mail::Sendmail which results in software error if edited field has utf-8 characters (because of first point, this happend if ANY fields has utf-8 chars) 3. when declaring encoding for outgoing e-mail utf-8 is more correct than just utf8 Test scenario: 1. open opac-userupdate and edit user which has utf-8 characters in at least one field (firstname and surname are common examples) 2. edit one of other fields and add utf-8 character to it 3. verify that e-mail with changes arrived with just edited field Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Followed the test plan. Sendmail error without patch, no email sent. After applying the patch the email is sent, o error page. BTW. I also have the patrons email address as changed in the email that is sent to the library (it was not really changed), no matter if I apply this patch or not. Is that normal?
Yes. In current implementation we are just sending e-mail with changes and expect librarians to enter changes through intranet manually from e-mail message (probably to have some kind of verification). I used to have quick dirty change back in Koha 3.1 or so which would also save those changes in database, but then we changed our workflow and moved to newer version, so I never submited them to upstream or ported them to newer version. It would probably make sense to revisit that code, and wrap up that in proper improvement, but I can't promise any time-frame for that.
Hi Dobrica, not related to this bug, but to your comment about getting rid of requiring manual changes - there is bug 7067 for patron self registration. I have not tested it myself, so I am not sure how it works. But the test plan looks a bit like what you might be looking for: Test Plan - Part 2 - Borrower Modifications 1) Log in to OPAC, go to "my personal details" tab. 2) Make some modifications to your details. 3) Repeat steps 1 and 2 for two more borrowers. 4) Log in to Koha intranet with a user that can modify borrowers. 5) At the bottom of mainpage.pl, you should see: Patrons requesting modifications: 3 6) Click the link 7) Approve one change, deny a different one, and ignore the third, then submit. 8) Check the records, you should see the changes take affect on the approved one, and no changes to the other two. You should also see "Patrons requesting modifications: 1" at the bottom of mainpage.pl now.
Thanks Katrin, I wouldn't found it without your pointer. I will give it a try. It seems that bug 7067 is targeting 3.12 so this bugfix might still be useful for older versions of Koha.
Yes, and I am glad you fixed it - I found the bug last week when training a library :)
utf-8 support for opac-userupdate Marked as Passed QA.
Patch pushed to master
Pushed to 3.8.x will be in 3.8.7
Pushed to 3.6.x will be in 3.6.11.