Bug 39144

Summary: OPAC virtual card page is missing custom CSS from OPACUserCSS
Product: Koha Reporter: Jason Robb <jrobb>
Component: OPACAssignee: David Cook <dcook>
Status: Pushed to main --- QA Contact: Marcel de Rooy <m.de.rooy>
Severity: trivial    
Priority: P5 - low CC: dcook, m.de.rooy
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: Trivial patch Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
25.05.00
Circulation function:
Attachments: Bug 39144: Remove second call to opac.css
Bug 39144: Remove second call to opac.css
Bug 39144: Remove second call to opac.css

Description Jason Robb 2025-02-14 17:50:00 UTC
Custom CSS is not applied to the OPAC virtual card page (opac-virtual-card.pl).

To replicate:

1. Set OPACVirtualCard syspref to Allow
2. Add an obvious change to OPACUserCSS syspref ( body {background-color: pink;} )
3. Switch to the OPAC, notice the CSS is in effect
4. Log in and go to 'Your account' then 'My virtual card' from the menu on the left
5. Notice the custom CSS is no longer in effect
Comment 1 David Cook 2025-02-16 23:32:34 UTC
Good catch!

Funny story... it looks like OPACUserCSS is being rendered in the HTML, but the OPAC virtual card page mistakenly applies the opac.css twice. Once before and once after OPACUserCSS.
Comment 2 David Cook 2025-02-16 23:34:22 UTC
Created attachment 178129 [details] [review]
Bug 39144: Remove second call to opac.css

This change removes an unnecessary second call to opac.css on
the opac-virtual-card.pl page.

Test plan:
1. Set OPACVirtualCard syspref to Allow
2. Add an obvious change to OPACUserCSS syspref ( body {background-color: pink;} )
3. Switch to the OPAC, notice the CSS is in effect
4. Log in and go to 'Your account' then 'My virtual card' from the menu on the left
5. Notice the custom CSS affects the virtual card page too
Comment 3 David Nind 2025-02-18 18:07:03 UTC
Created attachment 178300 [details] [review]
Bug 39144: Remove second call to opac.css

This change removes an unnecessary second call to opac.css on
the opac-virtual-card.pl page.

Test plan:
1. Set OPACVirtualCard syspref to Allow
2. Add an obvious change to OPACUserCSS syspref ( body {background-color: pink;} )
3. Switch to the OPAC, notice the CSS is in effect
4. Log in and go to 'Your account' then 'My virtual card' from the menu on the left
5. Notice the custom CSS affects the virtual card page too

Signed-off-by: David Nind <david@davidnind.com>
Comment 4 Marcel de Rooy 2025-02-21 08:41:52 UTC
Created attachment 178450 [details] [review]
Bug 39144: Remove second call to opac.css

This change removes an unnecessary second call to opac.css on
the opac-virtual-card.pl page.

Test plan:
1. Set OPACVirtualCard syspref to Allow
2. Add an obvious change to OPACUserCSS syspref ( body {background-color: pink;} )
3. Switch to the OPAC, notice the CSS is in effect
4. Log in and go to 'Your account' then 'My virtual card' from the menu on the left
5. Notice the custom CSS affects the virtual card page too

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 5 Katrin Fischer 2025-02-21 15:45:06 UTC
Pushed for 25.05!

Well done everyone, thank you!