CAS 6.2.x custom theme problem - theme not changing

66 views
Skip to first unread message

John Wagenleitner

unread,
Oct 21, 2020, 6:12:22 PM10/21/20
to CAS Community
Upgrading from 6.1.7 to the 6.2.x release and noticing that once a custom theme is displayed, that theme is displayed from that point on no matter what theme the service definition specifies and it happens for all browsers/users and not just on the browser that first requested the service with the custom theme.

We use the json service registry. Turning on debug we can see messages for ``org.apereo.cas.services.web.RegisteredServiceThemeResolver`` that shows the service is configured to use a custom theme, but that theme is not shown.

We have the default, theme-A and theme-B. When first starting CAS and using a service with no theme set the default is shown. Then if a service with theme-A set, that theme is shown. But then using a service with theme-B set, the theme-A is still shown. And a service with no theme set still shows theme-A (the first custom theme displayed after start-up). Same thing happens if theme-B is the first custom theme requested, all future requests will only show theme-B.

I looked over the release notes and didn't notice anything specific to theming. Everything worked as expected in 6.1.7 and other than removing the ldap `providerClass` property our config didn't change between 6.1.7 and 6.2.4. I have also tried all of the 6.2.[0-4] release and 6.3.0 RC's and all exhibit the same issue for us.

Any help or pointers would be appreciated.

Jonathon Taylor

unread,
Oct 21, 2020, 8:08:02 PM10/21/20
to cas-...@apereo.org
John,

We saw the same behavior and fixed it by disabling Spring thymeleaf caching.  Performance testing shows no difference so seems like an OK fix.  Try adding this to cas.properties:

spring.thymeleaf.cache=false

Jonathon

--
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
---
You received this message because you are subscribed to the Google Groups "CAS Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cas-user+u...@apereo.org.
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/dad50ae0-443e-4cb6-9985-004d400041dfn%40apereo.org.

John Wagenleitner

unread,
Oct 22, 2020, 1:15:02 PM10/22/20
to CAS Community, Jonathon Taylor
Thanks Jonathon, really appreciate the help. Disabling the thymeleaf cache fixed the issue and also seeing, as you mentioned, no significant difference in performance.
Reply all
Reply to author
Forward
0 new messages