[Bug 34870] New: Unrecognized special characters when writing off an invoice with a note
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34870 Bug ID: 34870 Summary: Unrecognized special characters when writing off an invoice with a note Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: I18N/L10N Assignee: koha-bugs@lists.koha-community.org Reporter: emily-rose.francoeur@inLibro.com QA Contact: testopia@bugs.koha-community.org CC: frederic@tamil.fr When we add a note with special characters to an invoice and then click on “Write off selected” the note field will display “�” symbols where the special characters are supposed to be. This is how you can reproduce the bug : 1- Go to any patron profile > Accounting > Create manual invoice 2- Fill the fields and click the “Save” button 3- Click “Make a payment” 4- Select the created invoice and click on “+ Add note” 5- Enter special characters (e.g., éçö) 6- Click the “Write off selected” button 7- In the note field, you should see “�” symbols where the special characters are supposed to be -- 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=34870 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |minor -- 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=34870 --- Comment #1 from Émily-Rose Francoeur <emily-rose.francoeur@inLibro.com> --- Created attachment 156005 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=156005&action=edit Bug 34870: Unrecognized special characters The informations entered in the note are encoded and sent in the 'notes' parameter of the URL. The issue arises because paycollect.pl get the information using param(), which does not support encoded text. By using param_fetch(), we can retrieve the informations without any issues. TEST PLAN 1) Go to any patron profile > Accounting > Create manual invoice 2) Fill the fields and click the “Save” button 3) Click “Make a payment” 4) Select the created invoice and click on “+ Add note” 5) Enter special characters (e.g., éçö) 6) Click the “Write off selected” button 7) In the note field, you should see “�” symbols where the special characters are supposed to be 8) Apply the patch 9) Refresh the page; now the special characters display correctly -- 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=34870 Émily-Rose Francoeur <emily-rose.francoeur@inLibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- 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=34870 Émily-Rose Francoeur <emily-rose.francoeur@inLibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |caroline.cyr-la-rose@inlibr | |o.com, | |philippe.blouin@inlibro.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34870 Émily-Rose Francoeur <emily-rose.francoeur@inLibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC|caroline.cyr-la-rose@inlibr | |o.com | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34870 Laura Escamilla <Laura.escamilla@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- 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=34870 Laura Escamilla <Laura.escamilla@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #156005|0 |1 is obsolete| | --- Comment #2 from Laura Escamilla <Laura.escamilla@bywatersolutions.com> --- Created attachment 156006 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=156006&action=edit Bug 34870: Unrecognized special characters The informations entered in the note are encoded and sent in the 'notes' parameter of the URL. The issue arises because paycollect.pl get the information using param(), which does not support encoded text. By using param_fetch(), we can retrieve the informations without any issues. TEST PLAN 1) Go to any patron profile > Accounting > Create manual invoice 2) Fill the fields and click the “Save” button 3) Click “Make a payment” 4) Select the created invoice and click on “+ Add note” 5) Enter special characters (e.g., éçö) 6) Click the “Write off selected” button 7) In the note field, you should see “�” symbols where the special characters are supposed to be 8) Apply the patch 9) Refresh the page; now the special characters display correctly Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com> -- 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=34870 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |emily-rose.francoeur@inLibr |ity.org |o.com --- Comment #3 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Don't forget to set assignee :) -- 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=34870 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA CC| |jonathan.druart+koha@gmail. | |com --- Comment #4 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- No, you need to URI escape it, or other characters won't pass (;). Also there is something very wrong here. If we select several lines and add different notes, only the last one is kept? Looks like it needs a bit more of thinking overall. Also the commit title can be improved to tell more what the patch does. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34870 --- Comment #5 from Émily-Rose Francoeur <emily-rose.francoeur@inLibro.com> --- Created attachment 156120 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=156120&action=edit Bug 34870:Perform UTF8 encoding before redirection Display special characters correctly when writing off an invoice. The issue arises because pay.pl does not perform UTF-8 encoding on the “notes” parameter before redirecting the page. By using uri_escape_utf8, characters with a code above 255 are also UTF-8 encoded. Then, paycollect.pl can collect the information without any trouble. This patch work with “;” and “:” characters. TEST PLAN 1) Go to any patron profile > Accounting 2) Click “Create manual invoice” 3) Fill the fields and click the “Save” button 4) Repeat steps 2 and 3 5) Click “Make a payment” 6) Add a note with special characters for each one (e.g., éçö) 7) Select the created invoices and click the “Write off selected” button 8) In the note field, you should see “�” symbols where the special characters are supposed to be 9) Click the “Cancel” button 10) Now add a note with “:;” for one of the invoices 11) Select the invoices and click the “Write off selected” button 12) You should see a page with an error 500 13) Go back to the “Make a payment” page 14) Apply the patch 15) Add a note with special characters for each one (e.g., éçö) 16) Add “:;” to one of the note fields 17) Select the invoices and click the “Write off selected” button 18) Now the special characters are displayed correctly -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34870 Émily-Rose Francoeur <emily-rose.francoeur@inLibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34870 --- Comment #6 from Émily-Rose Francoeur <emily-rose.francoeur@inLibro.com> --- This is an updated test plan, because there is no 500 error page displayed after entering “:;” in the note field. TEST PLAN 1) Go to any patron’s profile > Accounting 2) Click “Create manual invoice” 3) Complete the required fields and click the “Save” button 4) Repeat steps 2 and 3 5) Click “Make a payment” 6) Add a note with special characters for each one (e.g., éçö) 7) Add “:;” to the note field for one of the invoices 8) Select the created invoices and click the “Write off selected” button 9) In the note field, you should see “�” symbols where the special characters are supposed to be, and there would be nothing for “:;” characters. 10) Click the “Cancel” button 11) Apply the patch 12) Repeat steps 6 to 8 13) Verify that the special characters are now displayed correctly -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34870 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com Status|Needs Signoff |Failed QA --- Comment #7 from David Nind <david@davidnind.com> --- Hi Émily-Rose. I had a go at testing, and can confirm the issue. However, with the patch applied it doesn't work for me as expected. I get this after clicking 'Write off selected': :; éçö (where :; entered into the first note and éçö for the second note) I tested using Firefox (browser cache cleared after applying the patch) David Testing notes (using koha-testing-docker): 1. The note field mentioned is in the column 'Payment note' on the 'Make a payment' tab. Click the '+ Add note' to add a payment note (it took me a while to find this!). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34870 Émily-Rose Francoeur <emily-rose.francoeur@inLibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #156006|0 |1 is obsolete| | Attachment #156006|1 |0 is patch| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34870 --- Comment #8 from Émily-Rose Francoeur <emily-rose.francoeur@inLibro.com> --- I forgot last time to mark one of the attachments as obsolete. Now, it should work. I've also updated the test plan to make it clearer. TEST PLAN 1) Go to any patron’s profile > Accounting 2) Click on “Create manual invoice” 3) Complete the required fields and click the “Save” button 4) Repeat steps 2 and 3 5) Click on “Make a payment” 6) Click on “+ Add note” and add a note with special characters (e.g., éçö) for each invoice you create 7) Add “:;” to the note field for one of the invoices 8) Select the created invoices and click the “Write off selected” button 9) In the note field, you should see “�” symbols where the special characters are supposed to be, and there should be nothing for “:;” characters. 10) Click the “Cancel” button 11) Apply the patch 12) Repeat steps 6 to 8 13) Verify that the special characters are now displayed correctly -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34870 Émily-Rose Francoeur <emily-rose.francoeur@inLibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34870 Émily-Rose Francoeur <emily-rose.francoeur@inLibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |caroline.cyr-la-rose@inlibr | |o.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34870 David Nind <david@davidnind.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=34870 --- Comment #9 from David Nind <david@davidnind.com> --- Created attachment 156357 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=156357&action=edit Bug 34870: Perform UTF8 encoding before redirection Display special characters correctly when writing off an invoice. The issue arises because pay.pl does not perform UTF-8 encoding on the “notes” parameter before redirecting the page. By using uri_escape_utf8, characters with a code above 255 are also UTF-8 encoded. Then, paycollect.pl can collect the information without any trouble. This patch work with “;” and “:” characters. TEST PLAN 1) Go to any patron profile > Accounting 2) Click “Create manual invoice” 3) Fill the fields and click the “Save” button 4) Repeat steps 2 and 3 5) Click “Make a payment” 6) Add a note with special characters for each one (e.g., éçö) 7) Select the created invoices and click the “Write off selected” button 8) In the note field, you should see “�” symbols where the special characters are supposed to be 9) Click the “Cancel” button 10) Now add a note with “:;” for one of the invoices 11) Select the invoices and click the “Write off selected” button 12) You should see a page with an error 500 13) Go back to the “Make a payment” page 14) Apply the patch 15) Add a note with special characters for each one (e.g., éçö) 16) Add “:;” to one of the note fields 17) Select the invoices and click the “Write off selected” button 18) Now the special characters are displayed correctly Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34870 --- Comment #10 from David Nind <david@davidnind.com> --- (In reply to Émily-Rose Francoeur from comment #8)
I forgot last time to mark one of the attachments as obsolete. Now, it should work. I've also updated the test plan to make it clearer.
Thanks Émily-Rose! Now signed off. David -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34870 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This fixes the display of release notes| |UTF-8 characters for write | |off notes under a patron's | |accounting section. | |Previously, if you added a | |note when writing off | |multiple charges ([Patron] | |> Accounting > Make a | |payment > Payment note | |column > + Add note), a | |note with special | |characters (for example, | |éçö) did not display | |correctly. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34870 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34870 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #156120|0 |1 is obsolete| | Attachment #156357|0 |1 is obsolete| | --- Comment #11 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 156363 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=156363&action=edit Bug 34870: Perform UTF8 encoding before redirection Display special characters correctly when writing off an invoice. The issue arises because pay.pl does not perform UTF-8 encoding on the “notes” parameter before redirecting the page. By using uri_escape_utf8, characters with a code above 255 are also UTF-8 encoded. Then, paycollect.pl can collect the information without any trouble. This patch work with “;” and “:” characters. TEST PLAN 1) Go to any patron profile > Accounting 2) Click “Create manual invoice” 3) Fill the fields and click the “Save” button 4) Repeat steps 2 and 3 5) Click “Make a payment” 6) Add a note with special characters for each one (e.g., éçö) 7) Select the created invoices and click the “Write off selected” button 8) In the note field, you should see “�” symbols where the special characters are supposed to be 9) Click the “Cancel” button 10) Now add a note with “:;” for one of the invoices 11) Select the invoices and click the “Write off selected” button 12) You should see a page with an error 500 13) Go back to the “Make a payment” page 14) Apply the patch 15) Add a note with special characters for each one (e.g., éçö) 16) Add “:;” to one of the note fields 17) Select the invoices and click the “Write off selected” button 18) Now the special characters are displayed correctly Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> [EDIT] Added parentheses around construct for clarity. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34870 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34870 --- Comment #12 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Jonathan Druart from comment #4)
No, you need to URI escape it, or other characters won't pass (;). Also there is something very wrong here. If we select several lines and add different notes, only the last one is kept?
Looks like it needs a bit more of thinking overall.
Also the commit title can be improved to tell more what the patch does.
Will open a new report for the multiple notes thing. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34870 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |34956 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34956 [Bug 34956] members/pay.pl: Multiple notes get lost -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34870 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |23.11.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34870 --- Comment #13 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 23.11. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34870 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m Status|Pushed to master |Pushed to stable Version(s)|23.11.00 |23.11.00,23.05.05 released in| | --- Comment #14 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 23.05.x for 23.05.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34870 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Pushed to oldstable Version(s)|23.11.00,23.05.05 |23.11.00,23.05.05,22.11.11 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34870 --- Comment #15 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Nice work everyone! Pushed to oldstable for 22.11.x -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org