[Bug 35187] New: Fix line breaks in some HTML notices, including WELCOME
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35187 Bug ID: 35187 Summary: Fix line breaks in some HTML notices, including WELCOME Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Notices Assignee: koha-bugs@lists.koha-community.org Reporter: katrin.fischer@bsz-bw.de QA Contact: testopia@bugs.koha-community.org Blocks: 34704 When a notices is marked as HTML, we need to use block elements (p, div, li, etc.) or explicit line breaks. This adds the line breaks where required. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34704 [Bug 34704] Print templates are formatted incorrectly -- 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=35187 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl --- Comment #1 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- *** Bug 35018 has been marked as a duplicate of this bug. *** -- 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=35187 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Small patch -- 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=35187 --- Comment #2 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 158049 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=158049&action=edit Bug 35187: Make sure HTML notices use explicit line breaks When a notices is marked as HTML, we need to use block elements (p, div, li, etc.) or explicit line breaks. This adds the line breaks where required. Affects: * ISSUEQSLIP * ISSUESLIP * TRANSFERSLIP * CHECKINSLIP * HOLD_SLIP * WELCOME The biggest change is the WELCOME notices. With this patch it appears no longer on only one line, but properly formatted. To test: WELCOME * Without patch * Make sure your Koha can send email (set up SMTP server, KohaAdminLibraryAddress) * Make sure your patron has an email set * In patron account, use "More > Welcome email" * Verify all text is on one line * Apply patch * reset_all to install new sample notice templates * Repeat test, verify welcome notice is now nice ISSUESLIP, ISSUEQSLIP * Checkout at least 2 items * Print > Print slip * Print > Print quick slip * Verify both look nice! CHECKINSLIP * Return both items * Print checkin slip (button in list of checkouts) * Verfiy... you know, that it looks nice! TRANSFERSLIP * Checkin an item from another library * "Print transfer slip" * Verify again. HOLD_SLIP * Place a hold on a record * Return an item that can fill the hold * "Print slip and confirm" * Verify. * Note: if you compare to before, this also removes a <> appearing instead of the city. -- 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=35187 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #158049|0 |1 is obsolete| | --- Comment #3 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 158050 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=158050&action=edit Bug 35187: Make sure HTML notices use explicit line breaks When a notices is marked as HTML, we need to use block elements (p, div, li, etc.) or explicit line breaks. This adds the line breaks where required. Affects: * ISSUEQSLIP * ISSUESLIP * TRANSFERSLIP * CHECKINSLIP * HOLD_SLIP * WELCOME The biggest change is the WELCOME notices. With this patch it appears no longer on only one line, but properly formatted. To test: WELCOME * Without patch * Make sure your Koha can send email (set up SMTP server, KohaAdminLibraryAddress) * Make sure your patron has an email set * In patron account, use "More > Welcome email" * Verify all text is on one line * Apply patch * reset_all to install new sample notice templates * Repeat test, verify welcome notice is now nice ISSUESLIP, ISSUEQSLIP * Checkout at least 2 items * Print > Print slip * Print > Print quick slip * Verify both look nice! CHECKINSLIP * Return both items * Print checkin slip (button in list of checkouts) * Verfiy... you know, that it looks nice! TRANSFERSLIP * Checkin an item from another library * "Print transfer slip" * Verify again. HOLD_SLIP * Place a hold on a record * Return an item that can fill the hold * "Print slip and confirm" * Verify. * Note: if you compare to before, this also removes a <> appearing instead of the city. -- 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=35187 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. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35187 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #158050|0 |1 is obsolete| | --- Comment #4 from David Nind <david@davidnind.com> --- Created attachment 158055 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=158055&action=edit Bug 35187: Make sure HTML notices use explicit line breaks When a notices is marked as HTML, we need to use block elements (p, div, li, etc.) or explicit line breaks. This adds the line breaks where required. Affects: * ISSUEQSLIP * ISSUESLIP * TRANSFERSLIP * CHECKINSLIP * HOLD_SLIP * WELCOME The biggest change is the WELCOME notices. With this patch it appears no longer on only one line, but properly formatted. To test: WELCOME * Without patch * Make sure your Koha can send email (set up SMTP server, KohaAdminLibraryAddress) * Make sure your patron has an email set * In patron account, use "More > Welcome email" * Verify all text is on one line * Apply patch * reset_all to install new sample notice templates * Repeat test, verify welcome notice is now nice ISSUESLIP, ISSUEQSLIP * Checkout at least 2 items * Print > Print slip * Print > Print quick slip * Verify both look nice! CHECKINSLIP * Return both items * Print checkin slip (button in list of checkouts) * Verfiy... you know, that it looks nice! TRANSFERSLIP * Checkin an item from another library * "Print transfer slip" * Verify again. HOLD_SLIP * Place a hold on a record * Return an item that can fill the hold * "Print slip and confirm" * Verify. * Note: if you compare to before, this also removes a <> appearing instead of the city. Signed-off-by: David Nind <david@davidnind.com> -- 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=35187 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |katrin.fischer@bsz-bw.de |ity.org | CC| |david@davidnind.com --- Comment #5 from David Nind <david@davidnind.com> --- All nice improvements! The only thing I noticed with the WELCOME notice, is that it displayed OK for me before the patch under Patrons > [Account] > Notices, but the email received was all on one line. After the patch, there are extra lines displayed under Patrons > [Account] > Notices, but the email received is now nicely formatted. I tried using <p>s instead of <br/>s - no visible change for email message received, and only slightly better under Patrons > [Account] > Notices. Better that the email message that goes out is correct by default. I changed the bug assignee 8-) Testing notes (using KTD): 1. Add email to KohaAdminEmailAddress system preference. 2. To test sending emails using a Google account: 3.1 Set up an App password in your Google Account 3.2 Edit /etc/koha/sites/kohadev/koha-conf.xml file and add this configuration near the end (where <user_name> = your Google email address; <password> = your APP password, not your Google account password): <smtp_server> <host>smtp.gmail.com</host> <port>587</port> <timeout>5</timeout> <ssl_mode>STARTTLS</ssl_mode> <user_name>GOOGLEACCOUNTUSER</user_name> <password>GOOGLEAPPPASSWORD</password> <debug>1</debug> </smtp_server> 3. WELCOME - Before the patch: . Displays OK for me if you view the message under Patron > [Account] > Notices . The email received (after running misc/cronjobs/process_message_queue.pl) is all on one line - After the patch: . There are extra lines if you view the message under Patron > Notices (not a showstopper for me - better that the email that goes out is correct) . The email received (after running misc/cronjobs/process_message_queue.pl) is now correctly formatted and looks great! . I tried using <p></p> tags instead of <br/> tags: the email message comes through the same, the preview under Patrons > [Account] > Notices looks slightly better, but still has extra lines . Not sure what the best way to do this is! -- 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=35187 --- Comment #6 from David Nind <david@davidnind.com> --- (In reply to David Nind from comment #5)
The only thing I noticed with the WELCOME notice, is that it displayed OK for me before the patch under Patrons > [Account] > Notices, but the email received was all on one line. After the patch, there are extra lines displayed under Patrons > [Account] > Notices, but the email received is now nicely formatted. I tried using <p>s instead of <br/>s - no visible change for email message received, and only slightly better under Patrons > [Account] > Notices. Better that the email message that goes out is correct by default.
Please ignore these comments - just read the comments for the other bugs to address/look at this! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35187 --- Comment #7 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to David Nind from comment #6)
(In reply to David Nind from comment #5)
The only thing I noticed with the WELCOME notice, is that it displayed OK for me before the patch under Patrons > [Account] > Notices, but the email received was all on one line. After the patch, there are extra lines displayed under Patrons > [Account] > Notices, but the email received is now nicely formatted. I tried using <p>s instead of <br/>s - no visible change for email message received, and only slightly better under Patrons > [Account] > Notices. Better that the email message that goes out is correct by default.
Please ignore these comments - just read the comments for the other bugs to address/look at this!
Thx David! For the next one looking at this, what David describes is bug 30287. The notices tab doesn't distinguish between plain text and HTML notices correctly adding extra line breaks to the latter. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35187 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |trivial -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35187 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #158055|0 |1 is obsolete| | --- Comment #8 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 158509 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=158509&action=edit Bug 35187: Make sure HTML notices use explicit line breaks When a notices is marked as HTML, we need to use block elements (p, div, li, etc.) or explicit line breaks. This adds the line breaks where required. Affects: * ISSUEQSLIP * ISSUESLIP * TRANSFERSLIP * CHECKINSLIP * HOLD_SLIP * WELCOME The biggest change is the WELCOME notices. With this patch it appears no longer on only one line, but properly formatted. To test: WELCOME * Without patch * Make sure your Koha can send email (set up SMTP server, KohaAdminLibraryAddress) * Make sure your patron has an email set * In patron account, use "More > Welcome email" * Verify all text is on one line * Apply patch * reset_all to install new sample notice templates * Repeat test, verify welcome notice is now nice ISSUESLIP, ISSUEQSLIP * Checkout at least 2 items * Print > Print slip * Print > Print quick slip * Verify both look nice! CHECKINSLIP * Return both items * Print checkin slip (button in list of checkouts) * Verfiy... you know, that it looks nice! TRANSFERSLIP * Checkin an item from another library * "Print transfer slip" * Verify again. HOLD_SLIP * Place a hold on a record * Return an item that can fill the hold * "Print slip and confirm" * Verify. * Note: if you compare to before, this also removes a <> appearing instead of the city. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35187 --- Comment #9 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 158510 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=158510&action=edit Bug 35187: (follow-up) Use <br> consistently over <br /> The first patch highlighted a minor inconsistency to me and this patch just brings us closer to html5 consistency throughout the notices by replacing any existing occurences of `<br />` and `<br/>` with the recommended `<br>`. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35187 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com Status|Signed Off |Passed QA --- Comment #10 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- This is a great consistency improvement, thanks for spending time on it Katrin. All works as expected and QA scripts are happy too. I did a very minor follow-up to replace existing cases of <br /> with the current best practice of <br>. Passing QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35187 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |martin.renvoize@ptfs-europe |y.org |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35187 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=35187 --- Comment #11 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=35187 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m --- Comment #12 from Fridolin Somers <fridolin.somers@biblibre.com> --- Does not apply on 23.05.x Since this is minor we may let it for 23.11 only -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35187 --- Comment #13 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Fridolin Somers from comment #12)
Does not apply on 23.05.x Since this is minor we may let it for 23.11 only
The WELCOME notice is the main issue here, as it all comes out on one line. If you'd like I could provide a patch just fixing that for 23.05. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35187 --- Comment #14 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 158813 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=158813&action=edit [23.05] Bug 35187: Fix missing line breaks in WELCOME notice When a notices is marked as HTML, we need to use block elements (p, div, li, etc.) or explicit line breaks. This adds the line breaks where required. To test: WELCOME * Without patch * Make sure your Koha can send email (set up SMTP server, KohaAdminLibraryAddress) * Make sure your patron has an email set * In patron account, use "More > Welcome email" * Verify all text is on one line * Apply patch * reset_all to install new sample notice templates * Repeat test, verify welcome notice is now nice -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35187 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rel_23_05_candidate --- Comment #15 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Offering a low risk patch to fix the most urgent issue :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35187 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|23.11.00 |23.11.00,23.05.06 released in| | Status|Pushed to master |Pushed to stable --- Comment #16 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 23.05.x for 23.05.06 Thanks for the rebase ;) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35187 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart+koha@gmail. | |com --- Comment #17 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Wrong rebase... - - "Hello [% borrower.title %] [% borrower.firstname %] [% borrower.surname %]." - - "" - - "Thank you for joining [% IF Koha.Preference('LibraryName') %][% Koha.Preference('LibraryName') %][% ELSE %]the library[% END %]" - - "" - - "You can search for all our materials in our <a href='[% Koha.Preference('OPACBaseURL') %]'>catalog</a>." - - "" - - "Your library card number is [% borrower.cardnumber %]" - - "" - - "If you have any problems or questions regarding your account, please contact the library." + - "Hello [% borrower.title %] [% borrower.firstname %] [% borrower.surname %].<br>" + - "<br>" + - "Thank you for joining [% IF Koha.Preference('LibraryName') %][% Koha.Preference('LibraryName') %][% ELSE %]the library[% END %]<br>" + - "<br>" + - "You can search for all our materials in our <a href='[% Koha.Preference('OPACBaseURL') %]'>catalog</a>.<br>" + - "<br>" + - "Your library card number is [% borrower.cardnumber %]<br>" + - "<br>" + - "If you have any problems or questions regarding your account, please contact the library." Extra space at last line. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35187 --- Comment #18 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 158833 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=158833&action=edit Bug 35187: [23.05] (follow-up) Fix missing line breaks in WELCOME notice yaml was broken because of extra space -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35187 --- Comment #19 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- (In reply to Jonathan Druart from comment #18)
Created attachment 158833 [details] [review] Bug 35187: [23.05] (follow-up) Fix missing line breaks in WELCOME notice
yaml was broken because of extra space
Pushed to 23.05.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35187 --- Comment #20 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Ugh. Sorry. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35187 --- Comment #21 from Fridolin Somers <fridolin.somers@biblibre.com> --- Great thanks -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35187 Pedro Amorim <pedro.amorim@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|23.11.00,23.05.06 |23.11.00,23.05.06,22.11.12 released in| | Status|Pushed to stable |Pushed to oldstable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35187 --- Comment #22 from Pedro Amorim <pedro.amorim@ptfs-europe.com> --- Nice work everyone! Pushed to 22.11.x for next release -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org