In more recent version of Chrome if you go to /cgi-bin/koha/virtualshelves/shelves.pl and attempt to 'Print list' the dialog pops up and immediately closes. We fixed this problem in the OPAC with Bug 24061, the same fix is needed in the staff client on shelves.pl Read Bug 24061 for much of the details.
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.