Summary: | Printing broken in some versions of Chrome | ||
---|---|---|---|
Product: | Koha | Reporter: | Lucas Gass <lucas> |
Component: | Browser compatibility | Assignee: | Lucas Gass <lucas> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | minor | ||
Priority: | P5 - low | CC: | dcook, fridolin.somers, jonathan.druart, kyle, m.de.rooy, margaret, marjorie.barry-vila, martin.renvoize, nick, victor |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24061 | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: |
Printing in some versions of Google Chrome does not work correctly making it impossible to print. This patch alters the JavaScript which controls the print dialogues in order to make for a better a printing experience across all browsers.
|
Version(s) released in: |
21.05.00,20.11.06,20.05.12
|
Attachments: |
Bug 27282: Add window.onafterprint function
Bug 27282: Add window.onafterprint function Bug 27282: Add window.onafterprint function Bug 27282: fix all occurrences Bug 27282: Add window.onafterprint function Bug 27282: fix all occurrences Bug 27282: Add window.onafterprint function Bug 27282: fix all occurrences |
Description
Lucas Gass
2020-12-18 17:27:21 UTC
Created attachment 114535 [details] [review] Bug 27282: Add window.onafterprint function TO TEST: -set up a new list with a few items -go to /cgi-bin/koha/virtualshelves/shelves.pl and view that list. -Click 'Print List' in Chrome. -The tab opens but immediately closes itself. -Apply patch and clear cache -Try again, the print dialouge remains open Created attachment 114562 [details] [review] Bug 27282: Add window.onafterprint function TO TEST: -set up a new list with a few items -go to /cgi-bin/koha/virtualshelves/shelves.pl and view that list. -Click 'Print List' in Chrome. -The tab opens but immediately closes itself. -Apply patch and clear cache -Try again, the print dialouge remains open Signed-off-by: Owen Leonard <oleonard@myacpl.org> Created attachment 114685 [details] [review] Bug 27282: Add window.onafterprint function TO TEST: -set up a new list with a few items -go to /cgi-bin/koha/virtualshelves/shelves.pl and view that list. -Click 'Print List' in Chrome. -The tab opens but immediately closes itself. -Apply patch and clear cache -Try again, the print dialouge remains open Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> I don't recreate, but it works before and after and this makes code consistent There are two other occurrences, should not we fix them as well? koha-tmpl/intranet-tmpl/prog/en/includes/slip-print.inc: setTimeout('window.close()', 1); koha-tmpl/opac-tmpl/bootstrap/en/includes/slip-print.inc: setTimeout('window.close()', 1); Waiting for an answer. (In reply to Jonathan Druart from comment #5) > There are two other occurrences, should not we fix them as well? > > koha-tmpl/intranet-tmpl/prog/en/includes/slip-print.inc: > setTimeout('window.close()', 1); > > koha-tmpl/opac-tmpl/bootstrap/en/includes/slip-print.inc: > setTimeout('window.close()', 1); Yes, I think we should fix it everywhere for consistency. Created attachment 114933 [details] [review] Bug 27282: fix all occurrences This patch fixes all the occurrences, staff and OPAC. The problem only happens on some versions of Chrome. TO TEST: -set up a new list with a few items -go to /cgi-bin/koha/virtualshelves/shelves.pl and view that list. -Click 'Print List' in Chrome. -The tab opens but immediately closes itself. -Apply patch and clear cache -Try again, the print dialouge remains open -Go to cgi-bin/koha/sco/sco-main.pl in Chrome, make sure you can finish and print successfully -In the staff client in Chrome makes sure printing works in the following areas: 1. /cgi-bin/koha/circ/circulation.pl Print Slip and Print Quick Slip 2. /cgi-bin/koha/members/boraccount.pl Make a payment and make sure you can print the invoice 3. cgi-bin/koha/labels/spinelabel-home.pl Make a quick spine label in Chrome and make sure that prints. I tried to sign off but the printing worked in this version of Chrome. Version 88.0.4324.146 (Official Build) (64-bit) (In reply to Timothy Alexis Vass from comment #9) > I tried to sign off but the printing worked in this version of Chrome. > Version 88.0.4324.146 (Official Build) (64-bit) This was last happening for me in Chrome 78.0.3904.97 (In reply to Lucas Gass from comment #10) > (In reply to Timothy Alexis Vass from comment #9) > > I tried to sign off but the printing worked in this version of Chrome. > > Version 88.0.4324.146 (Official Build) (64-bit) > > This was last happening for me in Chrome 78.0.3904.97 According to https://en.wikipedia.org/wiki/Google_Chrome_version_history, Chrome 78 has been discontinued. Versions 87 and 88 are stable. (I've actually been playing with Chromium 90 lately too as Playwright uses it but that's a dev build. Puppeteer uses Chromium 88.) I reckon it should be safe to target only stable versions? > I reckon it should be safe to target only stable versions? In Bug 24061 we fixed this for the OPAC. For consistency sake shouldn't we add this fix everywhere? (In reply to Lucas Gass from comment #12) > > I reckon it should be safe to target only stable versions? > > In Bug 24061 we fixed this for the OPAC. For consistency sake shouldn't we > add this fix everywhere? Sounds fair to me heh. Just confirmed that this problem is happening to a user on Chrome 89.0.4389.90 Created attachment 119338 [details] [review] Bug 27282: Add window.onafterprint function TO TEST: -set up a new list with a few items -go to /cgi-bin/koha/virtualshelves/shelves.pl and view that list. -Click 'Print List' in Chrome. -The tab opens but immediately closes itself. -Apply patch and clear cache -Try again, the print dialouge remains open Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Owen Leonard <oleonard@myacpl.org> Created attachment 119339 [details] [review] Bug 27282: fix all occurrences This patch fixes all the occurrences, staff and OPAC. The problem only happens on some versions of Chrome. TO TEST: -set up a new list with a few items -go to /cgi-bin/koha/virtualshelves/shelves.pl and view that list. -Click 'Print List' in Chrome. -The tab opens but immediately closes itself. -Apply patch and clear cache -Try again, the print dialouge remains open -Go to cgi-bin/koha/sco/sco-main.pl in Chrome, make sure you can finish and print successfully -In the staff client in Chrome makes sure printing works in the following areas: 1. /cgi-bin/koha/circ/circulation.pl Print Slip and Print Quick Slip 2. /cgi-bin/koha/members/boraccount.pl Make a payment and make sure you can print the invoice 3. cgi-bin/koha/labels/spinelabel-home.pl Make a quick spine label in Chrome and make sure that prints. Signed-off-by: Owen Leonard <oleonard@myacpl.org> Created attachment 119752 [details] [review] Bug 27282: Add window.onafterprint function TO TEST: -set up a new list with a few items -go to /cgi-bin/koha/virtualshelves/shelves.pl and view that list. -Click 'Print List' in Chrome. -The tab opens but immediately closes itself. -Apply patch and clear cache -Try again, the print dialouge remains open Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Created attachment 119753 [details] [review] Bug 27282: fix all occurrences This patch fixes all the occurrences, staff and OPAC. The problem only happens on some versions of Chrome. TO TEST: -set up a new list with a few items -go to /cgi-bin/koha/virtualshelves/shelves.pl and view that list. -Click 'Print List' in Chrome. -The tab opens but immediately closes itself. -Apply patch and clear cache -Try again, the print dialouge remains open -Go to cgi-bin/koha/sco/sco-main.pl in Chrome, make sure you can finish and print successfully -In the staff client in Chrome makes sure printing works in the following areas: 1. /cgi-bin/koha/circ/circulation.pl Print Slip and Print Quick Slip 2. /cgi-bin/koha/members/boraccount.pl Make a payment and make sure you can print the invoice 3. cgi-bin/koha/labels/spinelabel-home.pl Make a quick spine label in Chrome and make sure that prints. Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Pushed to master for 21.05, thanks to everybody involved! Pushed to 20.11.x for 20.11.06 note: it was pushed to 20.05.x for 20.05.12 Not backported to oldoldstable (19.11.x). Feel free to ask if it's needed. |