Interesting -- I am experiencing this, as well.  The custom CSS file listed in 
/resources/theme-name.properties are being used, but the custom 
casLoginView.html is not.  It is working correctly for services where I have 
specified a theme, but not for the case where no service is specified in the 
URL.


If I come across any other information, I'll add to this thread.


Tim

________________________________
From: [email protected] <[email protected]> on behalf of Jonathan Franzone 
<[email protected]>
Sent: Friday, January 27, 2017 10:06:37 AM
To: CAS Community
Subject: [cas-user] Re: CAS 5.0.2 and customized theme

Update on my work towards resolving this issue. To try to find the root of the 
problem, I completely removed all of the default theme template files, leaving 
just my personalized ones. That resulted in an exception being thrown (some 
sort of Thymleaf parse exception). This leads me to believe that if there is a 
parse exception that the software will fall back to the default templates.

Going on that assumption, I modified my casLoginView.html template to just 
include HTML (no thymleaf instructions). It was basically a Hello World html 
file. I restarted Tomcat and bingo! it pulled up my theme file.

So no I just have to resolve what those parse exceptions are. Not a full 
solution, but hopefully it'll get you onto the right path and serve as a record 
of what is going on.

On Monday, January 23, 2017 at 7:18:17 AM UTC-6, Matthieu Marc wrote:
Hi,

I am using CAS 5.0.2 and cas-maven-overlay.

I am trying to create a custom theme named "ensam".

In cas.properties, I added following lines in order to make my theme the 
default theme.

cas.theme.paramName=theme
cas.theme.defaultThemeName=ensam


I create folder src/main/resources/templates/ensam and copied default views 
file in it. So that, I get src/main/resources/templates/ensam/casLoginView.html

I changed this file.

When I start CAS service (./build.sh run) and go to url /cas/login, I do not 
see my modification.

In log, I got following :

2017-01-23 13:25:10,220 DEBUG 
[org.apereo.cas.services.web.RegisteredServiceThemeBasedViewResolver] - <Found 
view ensam/casLoginView>
2017-01-23 13:25:10,265 DEBUG 
[org.apereo.cas.services.web.ServiceThemeResolver] - <Found custom theme 
[ensam] for service [id=1000......]

In my cas-overlay-template directory, I can find the file in theses places :

find ./ -name casLoginView.html
./src/main/resources/templates/ensam/casLoginView.html [my original file]
./target/war/work/org.apereo.cas/cas-server-webapp/WEB-INF/classes/templates/casLoginView.html
  [file without my changed]
./target/cas/WEB-INF/classes/templates/casLoginView.html [file from maven 
dependencies - without my changed]
./target/cas/WEB-INF/classes/templates/ensam/casLoginView.html [my file with 
changes]
./target/classes/templates/ensam/casLoginView.html [my file with changes]

What I missed to make my theme working ?

Thanks

--
- CAS gitter chatroom: https://gitter.im/apereo/cas
- CAS mailing list guidelines: https://apereo.github.io/cas/Mailing-Lists.html
- CAS documentation website: https://apereo.github.io/cas
- CAS project website: https://github.com/apereo/cas
---
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 [email protected]<mailto:[email protected]>.
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/23d118a9-6f36-4ec1-b8b4-b3cde868f909%40apereo.org<https://groups.google.com/a/apereo.org/d/msgid/cas-user/23d118a9-6f36-4ec1-b8b4-b3cde868f909%40apereo.org?utm_medium=email&utm_source=footer>.

-- 
- CAS gitter chatroom: https://gitter.im/apereo/cas
- CAS mailing list guidelines: https://apereo.github.io/cas/Mailing-Lists.html
- CAS documentation website: https://apereo.github.io/cas
- CAS project website: https://github.com/apereo/cas
--- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/BY1PR0201MB09040E37D22DE731BD5DF12D995D0%40BY1PR0201MB0904.namprd02.prod.outlook.com.

Reply via email to