Repository navigation
Conversation
Product builds skip resources-community, so admin and account consoles failed to find theme-resources.ftl. Serve one shared copy from theme-resources/templates instead of duplicating it per theme type. Closes keycloak#55514 Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The test bypasses ThemeResourceProvider registration and fallback, leaving the missing-template regression and custom-theme precedence without regression coverage.
1 open issue
What changed in this PR
This PR addresses #55514 by relying on the existing shared ThemeResourceProvider template, allowing a 8000 dmin and account consoles to load when community resources are excluded from product builds.
Changes:
- Removes four duplicate theme-local macro templates.
- Updates the macro-rendering unit test to load the shared template.
- Replaces the shared template’s synchronization comment with a description of its role.
| File | Description |
|---|---|
themes/src/main/resources/theme/base/login/theme-resources.ftl |
Removes the standard login copy. |
themes/src/main/resources-community/theme/base/login/theme-resources.ftl |
Removes the community login copy. |
themes/src/main/resources-community/theme/base/admin/theme-resources.ftl |
Removes the community admin copy. |
themes/src/main/resources-community/theme/base/account/theme-resources.ftl |
Removes the community account copy. |
services/src/test/java/org/keycloak/theme/ThemeResourcesMacrosTest.java |
Loads macros from the shared template path. |
services/src/main/resources/theme-resources/templates/theme-resources.ftl |
Clarifies the shared template’s purpose in a comment. |
Review effort: Balanced
| Configuration cfg = new Configuration(Configuration.VERSION_2_3_32); | ||
| cfg.setOutputFormat(HTMLOutputFormat.INSTANCE); | ||
| cfg.setClassLoaderForTemplateLoading(getClass().getClassLoader(), "theme/base/login"); | ||
| cfg.setClassLoaderForTemplateLoading(getClass().getClassLoader(), "theme-resources/templates"); |
Cover ThemeResourceProvider fallback for login, admin, and account, and verify a custom theme-local copy still takes precedence. Closes keycloak#55514 Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Closes #55514
Product builds skip
resources-community, so admin and account consoles could not resolvetheme-resources.ftl. Serve a single shared copy fromtheme-resources/templates(ThemeResourceProvider fallback) instead of duplicating it under each theme type.Decisions and assumptions:
theme-resources.ftl.