[keycloak-user] Breaking Change to Themes in 2.0/2.1?

Chris Hairfield chairfield at gmail.com
Fri Aug 26 14:03:55 EDT 2016


Hello Keycloak Users,

We recently upgraded from 1.9.8 to 2.1.0 and love it (fixes a good number
of issues we've been having), but it seems to have broken an important one:
our themes!

For all HTML input elements we've added (those backed by user properties),
when we modify their value and save/POST, Keycloak returns an HTML document
populated with the old values rather than the new. A refresh of the page is
required for the new value to be returned/displayed, even though the first
save is sufficient to save the new value on the user.

One may reproduce this easily in 2.1.0 by adding the following code to the
base theme's account.ftl file:

<div class="form-group">
    <div class="col-sm-2 col-md-2">
        <label for="user.attributes.example"
class="control-label">Example:</label>
    </div>
    <div class="col-sm-10 col-md-10">
        <input type="text" class="form-control" id="user.attributes.example"
name="user.attributes.example"
value="${(account.attributes.example!'')?html}"/>
    </div>
</div>

In an Incognito window, impersonate a user, update the Example input, and
click save. Your new value is stored as an attribute on the user, but the
value of the input is set to whatever it was before. Refresh your browser
for the updated value to appear.

Any thoughts as to why? Do we need to update our theme code somehow?

Thanks,
Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20160826/2c6ffd3e/attachment-0001.html 


More information about the keycloak-user mailing list