Skip to content

fix(GreenButtonAlliance#235) : correct context-relative links in Thyme… - #238

Closed
Muhamedkaif wants to merge 1 commit into
GreenButtonAlliance:mainfrom
Muhamedkaif:fix/thirdparty-context-path
Closed

Muhamedkaif wants to merge 1 commit into
GreenButtonAlliance:mainfrom
Muhamedkaif:fix/thirdparty-context-path

Conversation

@Muhamedkaif

@Muhamedkaif Muhamedkaif commented Nov 14, 2026 •

Copy link
Copy Markdown

Closes #235


Changes Made

Updated internal navigation links to use Thymeleaf context-aware URL expressions (th:href="@{...}").

Applied the changes to the following templates:

  • home.html

  • error.html

  • login.html

  • terms.html

  • usage-policy.html

  • Ensured internal links correctly respect the application's servlet context path.


Reason for Change

Root-relative URLs can break when the application is deployed under a non-root servlet context path. Using Thymeleaf URL expressions ensures that generated links include the configured context path.


Testing

  • Successfully built the multi-module Maven project with tests skipped.

  • Started the ThirdParty Spring Boot application using the local profile.

  • Manually verified the updated links in the running application.

@dfcoffin

Copy link
Copy Markdown
Contributor

@Muhamedkaif Thanks for the PR, The repository is undergoing development and is a pre-release version that will replace the current GBA Sandbox when released. However, it is undergoing significant changes at the moment as well as advisory fixes for security issues. These are being fixed using local advisory notifications with an advisory update once corrected.

Please do not release your forked version to production until the formal Release of v-4.0.0.

@dfcoffin

Copy link
Copy Markdown
Contributor

Thank you, @Muhamedkaif. Your diagnosis of #235 was exactly right: the root-relative href="/..." links ignored the /ThirdParty context path, and th:href="@{...}" is the correct fix.

The same fix has since landed on main while the Third Party templates were being reworked, so I'm closing this PR as a duplicate rather than asking you to rebase:

Because the templates were rewritten, this branch now conflicts in all five files. Also, for future reference: CI did not start here because workflows from a first-time contributor's fork need a maintainer's approval, so the required ci-ok and pr-title checks never reported.

Contributions are very welcome. Issues labelled good first issue are a good place to start, and please do check with us on the issue before starting, since this pre-release code is changing quickly.

🤖 Generated with Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TP: home page navigation links ignore the /ThirdParty context path (404); dead energyos.github.io doc links

2 participants