-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make usage of absolute links configurable #506
Make usage of absolute links configurable #506
Conversation
Co-Authored-By: Stefan Weil <sw@weilnetz.de>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually this seems to work but keep in mind:
With TYPO9.5:
- You need a site-configuration with a base including scheme+domain. Without this the links keep to be relative. Providing "/" as base will change nothing with these settings and won't make absolute URLs.
- If you have no HTTPS scheme provided in the site-configuration, it won't be force by this setting.
- Don't know, what is happening with TYPO3 8.7.
As it shouldn't break anything, we can merge this even if it won't work as expected in all situaltions.
That's how it is intended to work:
But you are right, I should make it clearer, that having a proper |
} | ||
return $content; | ||
$conf['parameter'] = $altPageId ?: ($this->pi_tmpPageId ?: 'current'); | ||
$conf['additionalParams'] = $this->conf['parent.']['addParams'] . HttpUtility::buildQueryString($urlParameters, '&', true) . $this->pi_moreParams; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
buildQueryString() is unknown in TYPO3 8.7.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! I'll fix it in a separate pull request.
In multi-domain environments like the Zeitungsportal we need the option to force all links to be absolute. Since TYPO3 9.x the Typoscript configuration option
config.absRefPrefix
only effects links generated by Typoscript, but doesn't work globally.This Pull-Request introduces new extension-wide configuration options to force all generated links to be absolute. In addition it allows using HTTPS as default scheme for those URLs.
The default is to not use absolute links, so existing instances should behave exactly like before.