-
Notifications
You must be signed in to change notification settings - Fork 20
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
Redirects doesn't work on a multi root and multi domain setup #81
Comments
Is #68 related? |
Same problem here. It does not seems to work in a multi-site setup. Using TYPO3 8.7.19 and My Redirects 3.4.1. |
Did you try my fix ? |
@Simz, your fix worked for me! Thanks! |
Hi guys, I would rather use the records in sys_domain since, they are always present in a multidomain system.
|
We want to use a multiple localized domains with different pids like
website.en website.fr subsite1.fr subsite2.ru
…On Tue., May 19, 2020, 3:40 a.m. Konstantin Sölch, ***@***.***> wrote:
Hi guys,
i wonder why you use the RealUrl Config for that problem.
I would rather use the records in sys_domain since, they are always
present in a multidomain system.
/**
* Generate link based on current page information
*
* @param string $link
* @return string
* @todo future; refactor for TYPO3 9.x support
*/
protected function generateLink($link)
{
try {
$queryBuilder = $this->getQueryBuilderForTable('sys_domain');
$statement = $queryBuilder->select('pid')->from('sys_domain')->where($queryBuilder->expr()->eq('domainName', $queryBuilder->createNamedParameter(GeneralUtility::getIndpEnv('HTTP_HOST'))))->execute();
$defaultRootPageId = ConfigurationUtility::getDefaultRootPageId($link);
while ($row = $statement->fetch()) {
$defaultRootPageId = $row['pid'];
}
EidUtility::initializeTypoScriptFrontendController($defaultRootPageId);
list($url, $hash) = explode('#', $link, 2);
// Remove hashbang and append at the end
$_link = $this->getContentObjectRenderer()->typoLink_URL(
['parameter' => $url]
);
$link = $_link . ($hash ? '#' . $hash : '');
} catch (\Exception $e) {
}
return $link;
}
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#81 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADPRCZC6G6ESO75SECULQDRSIZWLANCNFSM4GUPAB6Q>
.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The problem is in the function getDefaultRootPageId().
This function only returns the _DEFAULT or the $configuration['defaultRootPageId'] but in a multi root multi domain context, it should return $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl'][GeneralUtility::getIndpEnv('HTTP_HOST')]. At least check if the array key exists.
ConfigurationUtility.php.txt
The text was updated successfully, but these errors were encountered: