You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i have an RealURL configuration, where the URL is created like this: www.domain.tld/path/
The function encodeUrl returns '/' als path for the rootpage and set [/] => urlPrependValue to $urlPrependRegister.
TYPO3 prepends the targetDomain to this url an calls postProcessEncodedUrl
postProcessEncodedUrl remove the domain with the preg_replace function and the result is an empty string, because the first "/" after the domain was removed.
So
if (isset(self::$urlPrependRegister[$testUrl]))
failes, because testUrl is ''(empty) and not '/' like in the urlPrependRegister.
This only happens at the rootpage, because other pages have no prepending '/'.
[somepath/] => urlPrependValue
To solve this problem, i add this code to the UrlEncode.php after the preg_replace
if($testUrl === '')
$testUrl = '/';
Find my modifications in UrlEncoder.php by searching for [BEGIN]Added by Reindl UrlEncoder.zip
I dont think i am alone. But this configuration is rare.
You have to configure a MultiLanguage system with domains as language switch. And if the path generation is configured to generate a path wihout ".html" e.g. "/path1/path2/" the path for the root is always "/"
$urlPrependRegister contains now [/] => de.domain.tld
TYPO3\CMS\Frontend\Typolink\PageLinkBuilder prepends the targetDomain to this path
/ => http://www.domain.tld/
postProcessEncodedUrl in UrlEncoder.php process now the finalTagParts from PageLinkBuilder and removes the domain from the url.
/ => http://www.domain.tld/ => '' (empty)
if (isset(self::$urlPrependRegister[$testUrl])) failes because '' (empty) is not in $urlPrependRegister.
$testUrl should never be '' (empty) because an empty value could never be an array key
maybe there is an other solution for this issue, but this one works perfect for me.
Hello,
i have an RealURL configuration, where the URL is created like this:
www.domain.tld/path/
The function encodeUrl returns '/' als path for the rootpage and set [/] => urlPrependValue to $urlPrependRegister.
TYPO3 prepends the targetDomain to this url an calls postProcessEncodedUrl
postProcessEncodedUrl remove the domain with the preg_replace function and the result is an empty string, because the first "/" after the domain was removed.
So
if (isset(self::$urlPrependRegister[$testUrl]))
failes, because testUrl is ''(empty) and not '/' like in the urlPrependRegister.
This only happens at the rootpage, because other pages have no prepending '/'.
[somepath/] => urlPrependValue
To solve this problem, i add this code to the UrlEncode.php after the preg_replace
Find my modifications in UrlEncoder.php by searching for [BEGIN]Added by Reindl
UrlEncoder.zip
Debuginfo
The text was updated successfully, but these errors were encountered: