Skip to content

[BUGFIX] Do not force absolute uri for relative links - #890

Merged
lukaszuznanski merged 1 commit into
4.xfrom
bugfix/889
May 21, 2026
Merged

[BUGFIX] Do not force absolute uri for relative links#890
lukaszuznanski merged 1 commit into
4.xfrom
bugfix/889

Conversation

@twoldanski

Copy link
Copy Markdown
Collaborator

Resolves: #889

@twoldanski
twoldanski requested a review from lukaszuznanski May 14, 2026 11:26
@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 25857501429

Warning

No base build found for commit 971a7c4 on 4.x.
Coverage changes can't be calculated without a base build.
If a base build is processing, this comment will update automatically when it completes.

Coverage: 72.849%

Details

  • Patch coverage: 2 of 2 lines across 1 file are fully covered (100%).

Uncovered Changes

No uncovered changes found.

Coverage Regressions

Requires a base build to compare against. How to fix this →


Coverage Stats

Coverage Status
Relevant Lines: 1569
Covered Lines: 1143
Line Coverage: 72.85%
Coverage Strength: 8.45 hits per line

💛 - Coveralls

@lukaszuznanski
lukaszuznanski merged commit fdf45e8 into 4.x May 21, 2026
14 checks passed
@develth

develth commented May 26, 2026

Copy link
Copy Markdown

seems like in v14 this is ignored, again

@twoldanski

Copy link
Copy Markdown
Collaborator Author

Not again, but this PR contains fix #893 for this issue for 5.x branch, this is for 4.x releases

@develth

develth commented May 27, 2026

Copy link
Copy Markdown

Thx!

kitzberger added a commit to GFEMediaGmbH/headless that referenced this pull request Jul 30, 2026
When getFrontendUrlWithSite() receives a relative URL (e.g.
/powermail/optin/{hash}/{mail}), the early-return guard
->getHost() === '' caused the URL to be returned
unchanged without prepending the configured frontendBase.

The intent of that check (introduced in TYPO3-Headless#890) was to prevent
external URLs from being rewritten, but it was too broad: it
blocked ALL relative URLs since they have no host component.

This fix removes the empty-host check and adds an empty-host
guard to isExternalUrl() so that relative URLs are correctly
identified as non-external and get rewritten to absolute
frontend URLs.

Resolves: TYPO3-Headless#903
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.

4 participants