Actions
Bug #97709
closedCannot generate absolute URL with uriBuilder
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
Updated by Georg Ringer over 2 years ago
- Status changed from New to Needs Feedback
did you provide a full url in the site configuration as entry point? see description
Main URL to call the frontend in default language. Can be https://www.example.com/ or just /, if it is just a / you cannot rely on TYPO3 creating full URLs
Updated by Florian Rival over 2 years ago
You're right Georg, I didn't set the full domain name in site configuration, this is the reason why it doesn't work.
Thanks for your help, you can close this issue.
Updated by Georg Ringer over 2 years ago
- Status changed from Needs Feedback to Closed
Actions