Bug 5833 - opacstylesheet not loading on all pages
Summary: opacstylesheet not loading on all pages
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: 3.4
Hardware: All All
: PATCH-Sent (DO NOT USE) normal (vote)
Assignee: Owen Leonard
QA Contact: Bugs List
Depends on:
Reported: 2011-03-05 17:14 UTC by Nicole C. Engard
Modified: 2012-10-25 23:03 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:

Proposed fix (970 bytes, patch)
2011-03-28 16:53 UTC, Owen Leonard
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nicole C. Engard 2011-03-05 17:14:00 UTC
I’m in the process of customizing some of the styling for our Koha installation and am running into a bit of a snag with styling on these pages:


I’m adding the custom css though the remote “opacstylesheet” option, but this file does not get loaded on the pages mentioned above (there may be more pages, I’m not certain).
Comment 1 Owen Leonard 2011-03-17 18:42:26 UTC
I see no problems with those pages when using the opacstylesheet preference. Can you test again? If it's still broken for you perhaps you could pass on the stylesheet for me to test with along with a description of what styles aren't showing up.
Comment 2 Owen Leonard 2011-03-28 16:38:20 UTC
I take back what I said before about not seeing it. It wasn't until I examined the logic of the template that I realized how the bug worked. The "opacstylesheet" variable isn't getting passed to the template on the login page. Unfortunately I don't understand why. The OPACUserCSS variable is working fine, for instance. What's different about opacstylesheet?
Comment 3 Jared Camins-Esakov 2011-03-28 16:39:45 UTC
This is probably a problem with C4::Auth. I will take a look at it.

Comment 4 Owen Leonard 2011-03-28 16:53:34 UTC
Created attachment 3470 [details] [review]
Proposed fix

Jared is right, and I just wasn't looking in the right place in Auth.pm. There is a separate section in which template variables are declared for the login page. The opacstylesheet variable was missing from that section.
Comment 5 Paul Poulain 2011-03-28 16:56:32 UTC
too bad we're late on submitting our patches: i've fixed (with the same fix) on march 17th.
So I confirm the problem and the fix (just in case = see branch am123/CRI/MT6039 on git.biblibre.com)
Comment 6 Chris Cormack 2011-03-29 08:59:15 UTC
Pushed, please test
Comment 7 MJ Ray (software.coop) 2011-04-07 10:50:56 UTC
This bug is mentioned in:
Fix for Bug 5833,	opacstylesheet not loading on all pages http://lists.koha-community.org/pipermail/koha-patches/2011-March/014283.html
Fix for Bug 5833,	opacstylesheet not loading on all pages http://lists.koha-community.org/pipermail/koha-patches/2011-March/014281.html