[Bug 18461] New: Internal server error while approving OPAC-edited patron attributes containing umlauts (äöü)
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18461 Bug ID: 18461 Summary: Internal server error while approving OPAC-edited patron attributes containing umlauts (äöü) Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Patrons Assignee: koha-bugs@lists.koha-community.org Reporter: veron@veron.ch QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com If a OPAC user enters text containing umlauts (äöü) in a patron atribute and saves it, the Staff client will get an inernal server error in members-update.pl (approving). E.g. a text like 111ä222 leads to the following in plack error log: malformed UTF-8 character in JSON string, at character offset 14 (before "\x{fffd}2","code":"T...") at (...)/Koha/Patron/Modifications.pm line 100. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18461 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=18339 Assignee|koha-bugs@lists.koha-commun |tomascohen@gmail.com |ity.org | -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18461 --- Comment #1 from Marc Véron <veron@veron.ch> --- Found: http://stackoverflow.com/questions/10708297/perl-convert-a-string-to-utf-8-f... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18461 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|tomascohen@gmail.com |veron@veron.ch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18461 --- Comment #2 from Marc Véron <veron@veron.ch> --- Created attachment 62538 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=62538&action=edit Bug 18461: Internal server error while approving OPAC-edited patron attributes containing umlauts (äöü) If a OPAC user enters text containing umlauts (äöü) in a patron atribute and saves it, the Staff client will get an inernal server error in members-update.pl (approving). E.g. a text like 111ä222 leads to the following in plack error log: malformed UTF-8 character in JSON string, at character offset 14 (before "\x{fffd}2","code":"T...") at (...)/Koha/Patron/Modifications.pm line 100. To test: - Reproduce problem above - Apply patch - Verify that Home > Patron > Update records displays without error and 'New value' displays properly -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18461 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Status|NEW |Needs Signoff Severity|normal |major --- Comment #3 from Marc Véron <veron@veron.ch> --- Setting to 'major' because of internal server error in staff client and, if bug is triggered, you can no longer access Home > Patron > Update. (You have to send a new, umlaut-less update request from OPAC) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18461 --- Comment #4 from Alex Buckley <alexbuckley@catalyst.net.nz> --- Created attachment 62569 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=62569&action=edit Bug 18461: Internal server error while approving OPAC-edited patron attributes containing umlauts (äöü) If a OPAC user enters text containing umlauts (äöü) in a patron atribute and saves it, the Staff client will get an inernal server error in members-update.pl (approving). E.g. a text like 111ä222 leads to the following in plack error log: malformed UTF-8 character in JSON string, at character offset 14 (before "\x{fffd}2","code":"T...") at (...)/Koha/Patron/Modifications.pm line 100. To test: - Reproduce problem above - Apply patch - Verify that Home > Patron > Update records displays without error and 'New value' displays properly Followed test plan and it works as intended Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18461 Alex Buckley <alexbuckley@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |alexbuckley@catalyst.net.nz Attachment #62538|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18461 Alex Buckley <alexbuckley@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18461 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #5 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- It does not work for me, I get "The passed extended_attributes is not valid JSON" -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18461 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |13757 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13757 [Bug 13757] Make patron attributes editable in the opac if set to 'editable in OPAC' -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18461 --- Comment #6 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 62617 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=62617&action=edit Bug 18461: (bug 13757 follow-up) Do not mix decode_json and to_json Internal server error while approving OPAC-edited patron attributes containing umlauts (äöü) If a OPAC user enters text containing umlauts (äöü) in a patron atribute and saves it, the Staff client will get an inernal server error in members-update.pl (approving). E.g. a text like 111ä222 leads to the following in plack error log: malformed UTF-8 character in JSON string, at character offset 14 To test: - Reproduce problem above - Apply patch - Verify that Home > Patron > Update records displays without error and 'New value' displays properly - Approve! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18461 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|major |critical Status|Failed QA |Needs Signoff Assignee|veron@veron.ch |jonathan.druart@bugs.koha-c | |ommunity.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18461 --- Comment #7 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 62631 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=62631&action=edit Bug 18461: Make tests break on wrong UTF8 data handilng This patch makes the tests fail if extended attributes handling fails due to wrong UTF-8 data handling. To test: - Run: $ sudo koha-shell kohadev k$ cd kohaclone k$ prove t/db_dependent/Koha/Patron/Modifications.t => FAIL: Tests explode Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18461 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #62617|0 |1 is obsolete| | --- Comment #8 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 62632 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=62632&action=edit Bug 18461: (bug 13757 follow-up) Do not mix decode_json and to_json Internal server error while approving OPAC-edited patron attributes containing umlauts (äöü) If a OPAC user enters text containing umlauts (äöü) in a patron atribute and saves it, the Staff client will get an inernal server error in members-update.pl (approving). E.g. a text like 111ä222 leads to the following in plack error log: malformed UTF-8 character in JSON string, at character offset 14 To test: - Reproduce problem above - Apply patch - Verify that Home > Patron > Update records displays without error and 'New value' displays properly - Approve! Also, run the tests: - Run: $ sudo koha-shell kohadev k$ cd kohaclone k$ prove t/db_dependent/Koha/Patron/Modifications.t => FAIL: Tests explode due to encoding problems in JSON handling - Apply the patch - Run the tests again: k$ prove t/db_dependent/Koha/Patron/Modifications.t => SUCCESS: Tests pass! Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18461 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com Attachment #62569|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18461 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18461 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@bywatersolutions.com Status|Signed Off |Passed QA --- Comment #9 from Nick Clemens <nick@bywatersolutions.com> --- Passing QA here but cant attach patches, ironically, because of the umlauts in the commit messages: UnicodeEncodeError: 'ascii' codec can't encode characters in position 116-118: ordinal not in range(128) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18461 --- Comment #10 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Nick Clemens from comment #9)
Passing QA here but cant attach patches, ironically, because of the umlauts in the commit messages: UnicodeEncodeError: 'ascii' codec can't encode characters in position 116-118: ordinal not in range(128)
Should work without the -e option of git-bz -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18461 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #62631|0 |1 is obsolete| | --- Comment #11 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 62666 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=62666&action=edit Bug 18461: Make tests break on wrong UTF8 data handilng This patch makes the tests fail if extended attributes handling fails due to wrong UTF-8 data handling. To test: - Run: $ sudo koha-shell kohadev k$ cd kohaclone k$ prove t/db_dependent/Koha/Patron/Modifications.t => FAIL: Tests explode Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18461 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #62632|0 |1 is obsolete| | --- Comment #12 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 62667 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=62667&action=edit Bug 18461: (bug 13757 follow-up) Do not mix decode_json and to_json Internal server error while approving OPAC-edited patron attributes containing umlauts (äöü) If a OPAC user enters text containing umlauts (äöü) in a patron atribute and saves it, the Staff client will get an inernal server error in members-update.pl (approving). E.g. a text like 111ä222 leads to the following in plack error log: malformed UTF-8 character in JSON string, at character offset 14 To test: - Reproduce problem above - Apply patch - Verify that Home > Patron > Update records displays without error and 'New value' displays properly - Approve! Also, run the tests: - Run: $ sudo koha-shell kohadev k$ cd kohaclone k$ prove t/db_dependent/Koha/Patron/Modifications.t => FAIL: Tests explode due to encoding problems in JSON handling - Apply the patch - Run the tests again: k$ prove t/db_dependent/Koha/Patron/Modifications.t => SUCCESS: Tests pass! Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18461 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com Status|Passed QA |Pushed to Master --- Comment #13 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to master for 17.05, thanks Tomas, Jonathan! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18461 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de Status|Pushed to Master |RESOLVED Resolution|--- |FIXED --- Comment #14 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Depends on bug 13757 which is not part of 16.11.x. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org