[keycloak-user] Running into an issue with login.ftl in a custom-made theme

David Gomes gomes at memsql.com
Mon Jan 2 04:35:50 EST 2017


Apparently, the issue was that after one edits standalone.xml, the new
settings are only
activated after restarting Keycloak (in my case restarting the jboss
keycloak container).

This is necessary because in order to edit templates and see changes one
must disable
cacheThemes and cacheTemplates in Keycloak’s standalone.xml.

Issue resolved!

On December 29, 2016 at 9:01:54 PM, David Gomes (gomes at memsql.com) wrote:

Good day,

I am writing my own Keycloak theme and I am using the Sunrise
<https://github.com/keycloak/keycloak/tree/master/examples/themes/src/main/resources/theme/sunrise>
 example theme as a starting point.

It seems, however, that when I create a sunrise/login/login.ftl file, such
as the one in the base theme, this file doesn't actually get used for
rendering the login form.

I tried to edit the base theme instead and edit its login/login.ftl. It
seems that editing this file has no effect at all. I wrote this in the file
and the login page for the base theme remained exactly the same.

<#import "template.ftl" as layout>
<@layout.registrationLayout displayInfo=social.displayInfo; section>
</@layout.registrationLayout>

Editing CSS, template.tfl and other things works, but editing the
theme/login/login.ftl has no effect at all.

The relevant settings for my Realm are the following:

"registrationAllowed": true,
"registrationEmailAsUsername": true,
"rememberMe": true,
"requiredCredentials": [ "password" ]

In the Keycloak administration console, editing the current theme works
perfectly fine as well, but I'm not being able to edit the actual login
form in any of the example themes. I tried other files such as register.ftl and
editing this one works perfectly fine.
David Gomes
MemSQL


More information about the keycloak-user mailing list