Skip to content

Fix logo redirect URL on logo being empty href#3091

Open
miku-orb wants to merge 1 commit into
gbif:masterfrom
IB-PAN:patch_logoredirecturl
Open

Fix logo redirect URL on logo being empty href#3091
miku-orb wants to merge 1 commit into
gbif:masterfrom
IB-PAN:patch_logoredirecturl

Conversation

@miku-orb

@miku-orb miku-orb commented Jun 22, 2026

Copy link
Copy Markdown

Fixes getLogoRedirectURL() in BaseAction.java not falling back to default URL if the string was empty.

public String getLogoRedirectURL() {
return Optional.ofNullable(cfg.getLogoRedirectUrl())
.orElse(cfg.getBaseUrl());
}

The logo redirect URL property could be an empty string instead of null (missing), if the logo redirect URL was previously set in admin panel, and then removed again (EDIT: it wasn't even needed to ever set it, to reproduce it's enough to just click Save on the IPT settings page).

This would have resulted in empty href on the logo link in HTML:

<a href="" rel="home" title="Logo" class="navbar-brand">

...which would make the logo link redirect to the present page instead of home page.

…ig.java

Fixes getLogoRedirectURL() in BaseAction.java not falling back to default URL if the string was empty.
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.

1 participant