Bug #62556
closedproblems with links and absRefPrefix when having multiple domains per site
100%
Description
if multiple domainrecords exist on a site, the following problems occur with links:
prerequisited:
- typo3 v. 6.2.5
- a site having at least 2 configured domain-records
- absRefPrefix is set to something (e.g. absRefPrefix = /)
steps to reproduce:
1. clear frontend cache
2. open site in browser using 2nd domain
resulting problems:
1. all typolinks to internal pages are hardcoded-prefixed with the 1st domain
2. a shortcut-page pointing to an internal page redirects to the 1st domain
3. any configured absRefPrefix is ignored
4. this version is cached. as a result, when opening the site using the 1st domain, the absRefPrefix is still ignored.
expected behaviour:
1. when using different domain-records for a single site, typo3 should always stay on that domain. i believe this was the case with typo3-versions prior to 6.2. my guess is, that earlier versions created page-caches for each domain-record.
2. typo3 should always use the absRefPrefix with links - no matter via which domain the site is browsed.
on a sidenote, the behaviour is different, if the 1st domain is used on an empty cache:
steps to reproduce:
1. clear frontend cache
2. open site in browser using 1st domain
result:
- absRefPrefix is correctly used.
- the domain is not hardcoded-prefixed with the domain.
- as we now have a "correct" version in the cache, we can now visit the page using the 2nd domain correctly with relative links .... up until we browse to an uncached page, where the problem described above kicks in.
Updated by Erik Sokoll about 10 years ago
We found out, that the domain record with the lowest uid is taken.
Moreover header information like "link rel="stylesheet"..." is handled correctly.
Seems to be a Typolink problem.
Updated by Gerald Buttinger about 10 years ago
i don't know, if this is the "right" solution, but the following code-change seems to have fixed the problem:
typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php @@ -4958,8 +4958,8 @@ if (version == "n3") { continue; } - // there is alread a NOT-forced entry and the current one is also NOT-forced, thus keep the old - if (!$sysDomainData[$row['pid']]['forced'] && !$row['forced']) { + // there is alread a NOT-forced entry and the current one is also NOT-forced and not the current HTTP_HOST, thus keep the old + if (!$sysDomainData[$row['pid']]['forced'] && !$row['forced'] && ($row['domainName'] !== GeneralUtility::getIndpEnv('HTTP_HOST'))) { continue; } }
Updated by Helmut Hummel almost 10 years ago
This behavior was introduced with this change: https://review.typo3.org/#/c/9023/
Updated by Gerrit Code Review almost 10 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/37037
Updated by Helmut Hummel almost 10 years ago
- Is Regression changed from No to Yes
Updated by Gerrit Code Review almost 10 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/37037
Updated by Gerrit Code Review almost 10 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/37037
Updated by Gerrit Code Review over 9 years ago
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/37037
Updated by Gerrit Code Review over 9 years ago
Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/37037
Updated by Gerrit Code Review over 9 years ago
Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/37037
Updated by Gerrit Code Review over 9 years ago
Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/37037
Updated by Gerrit Code Review over 9 years ago
Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/37037
Updated by Gerrit Code Review over 9 years ago
Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/37069
Updated by Gerrit Code Review over 9 years ago
Patch set 2 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/37069
Updated by Gerrit Code Review over 9 years ago
Patch set 3 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/37069
Updated by Helmut Hummel over 9 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 77fa6fe7d29c4228e3f4c06cc6743440d98f2803.