Bug 24874

Summary: Printing is broken on opac-results.pl page
Product: Koha Reporter: Mason James <mtj>
Component: OPACAssignee: Mason James <mtj>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: major    
Priority: P3 CC: 1joynelson, jonathan.druart, katrin.fischer, lucas, oleonard
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5287
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25072
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
20.05.00, 19.11.05, 19.05.10
Bug Depends on: 5287    
Bug Blocks:    
Attachments: pic2
pic1
The printing is broken on opac-results.pl page
Bug 24874: Printing is broken on opac-results.pl page (19.11.x)
Bug 24874: Printing is broken on opac-results.pl page (19.11.x)
Bug 24874: Printing is broken on opac-results.pl page (19.11.x)
Bug 24874: Printing is broken on opac-results.pl page (19.11.x)
Bug 24874: Printing is broken on opac-results.pl page (19.11.x)
ubuntu 19.10
ubuntu 19.10 (2)
Before (master)
After (master)
Bug 24874: Printing is broken on opac-results.pl page (19.11.x)
Bug 24874: Printing is broken on opac-results.pl page

Description Mason James 2020-03-16 02:46:26 UTC Comment hidden (obsolete)
Comment 1 Mason James 2020-03-16 02:52:56 UTC
Created attachment 100716 [details]
pic2
Comment 2 Mason James 2020-03-16 02:54:20 UTC
Created attachment 100717 [details]
pic1
Comment 3 Mason James 2020-03-16 02:57:00 UTC Comment hidden (obsolete)
Comment 4 Mason James 2020-03-16 02:58:50 UTC Comment hidden (obsolete)
Comment 5 Lucas Gass 2020-03-16 16:00:12 UTC
Mason,

I cannot clean apply this to the 19.11.x branch:

.git/rebase-apply/patch:32: trailing whitespace.
@page { margin: 1cm }
warning: 1 line adds whitespace errors.
Comment 6 Mason James 2020-03-16 23:52:21 UTC
(In reply to Lucas Gass from comment #5)
> Mason,
> 
> I cannot clean apply this to the 19.11.x branch:
> 
> .git/rebase-apply/patch:32: trailing whitespace.
> @page { margin: 1cm }
> warning: 1 line adds whitespace errors.

aah, good catch Lucas, i'll correct the patch :)
Comment 7 Mason James 2020-03-16 23:52:54 UTC Comment hidden (obsolete)
Comment 8 Mason James 2020-03-16 23:54:42 UTC
Created attachment 100838 [details] [review]
Bug 24874: Printing is broken on opac-results.pl page (19.11.x)

to test in 19.11.x...

- search for something in opac
- print page using file -> print
- observe printing is broken (pic1)

- apply patch

- search for something in opac
- print page using file -> print
- observe printing is fixed (pic2)

it seems this issue was introduced by bug 5287
Comment 9 Jonathan Druart 2020-03-18 15:43:32 UTC
CONFLICT (content): Merge conflict in koha-tmpl/opac-tmpl/bootstrap/css/print.css

You should not modify print.css but css/src/print.scss instead.
Comment 10 Mason James 2020-03-19 07:43:06 UTC
(In reply to Jonathan Druart from comment #9)
> CONFLICT (content): Merge conflict in
> koha-tmpl/opac-tmpl/bootstrap/css/print.css
> 
> You should not modify print.css but css/src/print.scss instead.

ah yes.. ill fix that
Comment 11 Mason James 2020-03-19 07:43:27 UTC
Created attachment 100995 [details] [review]
Bug 24874: Printing is broken on opac-results.pl page (19.11.x)

to test in 19.11.x...

- search for something in opac
- print page using file -> print
- observe printing is broken (pic1)

- apply patch

- search for something in opac
- print page using file -> print
- observe printing is fixed (pic2)

it seems this issue was introduced by bug 5287
Comment 12 Lucas Gass 2020-03-20 00:10:32 UTC
Created attachment 101063 [details] [review]
Bug 24874: Printing is broken on opac-results.pl page (19.11.x)

to test in 19.11.x...

- search for something in opac
- print page using file -> print
- observe printing is broken (pic1)

- apply patch

- search for something in opac
- print page using file -> print
- observe printing is fixed (pic2)

it seems this issue was introduced by bug 5287

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 13 Lucas Gass 2020-03-20 00:12:03 UTC
I signed off and this looks good but it should be noted that testers must run:
yarn build --view opac 

to regenerate the CSS
Comment 14 Lucas Gass 2020-03-20 00:15:27 UTC
Upon further looking, it appears that this problem is in master too, not just 19.11.x
Comment 15 Katrin Fischer 2020-03-22 13:08:02 UTC
I tested with Firefox in Ubuntu and can't replicate the issue. What I see is good alignment of the text on the left without the patch and a bit too much whitespace with the patch. 
I think we might want to investigate more to nail down when the problem appears and maybe browser differences?
Sending back to sign off for additional testing.
Comment 16 Mason James 2020-03-23 04:17:50 UTC
Created attachment 101395 [details]
ubuntu 19.10
Comment 17 Mason James 2020-03-23 04:18:25 UTC
Created attachment 101396 [details]
ubuntu 19.10 (2)
Comment 18 Mason James 2020-03-23 04:19:07 UTC
(In reply to Katrin Fischer from comment #15)
> I tested with Firefox in Ubuntu and can't replicate the issue. What I see is
> good alignment of the text on the left without the patch and a bit too much
> whitespace with the patch. 
> I think we might want to investigate more to nail down when the problem
> appears and maybe browser differences?
> Sending back to sign off for additional testing.

hi Cait
heres an pic of the problem on ubuntu 19.10, with firefox 69.0.3
Comment 19 Katrin Fischer 2020-03-23 15:25:35 UTC
Could the custom CSS be interfering?
Comment 20 Jonathan Druart 2020-03-23 15:37:57 UTC
Created attachment 101470 [details]
Before (master)
Comment 21 Jonathan Druart 2020-03-23 15:38:20 UTC
Created attachment 101471 [details]
After (master)
Comment 22 Lucas Gass 2020-03-23 15:43:51 UTC
Without patch:
If I set  IDreamBooksReadometer,  IDreamBooksResults,  IDreamBooksReviews to ADD: all looks well.

If I set them to DON'T ADD: 
My printed results look bad.
Comment 23 Owen Leonard 2020-03-23 17:22:37 UTC
Created attachment 101477 [details] [review]
Bug 24874: Printing is broken on opac-results.pl page (19.11.x)

to test in 19.11.x...

- search for something in opac
- print page using file -> print
- observe printing is broken (pic1)

- apply patch

- search for something in opac
- print page using file -> print
- observe printing is fixed (pic2)

it seems this issue was introduced by bug 5287

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 24 Owen Leonard 2020-03-23 17:23:28 UTC
I'm adding my signoff because I can reproduce the problem in both 19.11.x and master in both Firefox and Chrome (OSX), and the patch fixes it.
Comment 25 Katrin Fischer 2020-03-23 22:17:16 UTC
Created attachment 101496 [details] [review]
Bug 24874: Printing is broken on opac-results.pl page

to test:

- search for something in opac
- print page using file -> print
- observe printing is broken (pic1)

- apply patch

- search for something in opac
- print page using file -> print
- observe printing is fixed (pic2)

it seems this issue was introduced by bug 5287

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 26 Martin Renvoize 2020-03-24 09:30:25 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 27 Joy Nelson 2020-04-03 21:44:10 UTC
Backported to 19.11.x for 19.11.05
Comment 28 Lucas Gass 2020-04-13 20:27:02 UTC
backported to 19.05.x for 19.05.10
Comment 29 Mason James 2020-07-09 14:59:55 UTC
(In reply to Lucas Gass from comment #28)
> backported to 19.05.x for 19.05.10

this has been resolved now