Project

General

Profile

Actions

Bug #97709

closed

Cannot generate absolute URL with uriBuilder

Added by Florian Rival almost 2 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Extbase
Target version:
-
Start date:
2022-05-30
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
10
PHP Version:
7.4
Tags:
Complexity:
Is Regression:
Yes
Sprint Focus:

Description

If you try to generate an absolute URL with uriBuilder, you only have a relative URL.

$uri = $uriBuilder
    ->reset()
    ->setTargetPageType($pageType)
    ->setCreateAbsoluteUri(true)
    ->setTargetPageUid((int)$pageUid);

$absoluteUrl = $uri->build();

$absoluteUrl should have something like this:

https://www.mysite.com/the-page

and it has this instead :

/the-page
Actions

Also available in: Atom PDF