Project

General

Profile

Actions

Bug #62556

closed

problems with links and absRefPrefix when having multiple domains per site

Added by Gerald Buttinger about 10 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2014-10-30
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
5.4
Tags:
Complexity:
Is Regression:
Yes
Sprint Focus:

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.


Related issues 3 (0 open3 closed)

Related to TYPO3 Core - Bug #24389: speed up typoLink function by caching domain recordsClosedSteffen Gebert2010-12-22

Actions
Related to TYPO3 Core - Bug #63930: Typolinks don't respect TCEMAIN.previewDomain in multidomain environmentClosed2014-12-16

Actions
Related to TYPO3 Core - Feature #57526: provide magic keyword "_BEDOMAIN_" for TCEMAIN.previewDomain configurationClosed2014-04-02

Actions
Actions #1

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.

Actions #2

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;
                                        }
                                }

Actions #3

Updated by Helmut Hummel almost 10 years ago

This behavior was introduced with this change: https://review.typo3.org/#/c/9023/

Actions #4

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

Actions #5

Updated by Helmut Hummel almost 10 years ago

Please test attached patch

Actions #6

Updated by Helmut Hummel almost 10 years ago

  • Is Regression changed from No to Yes
Actions #7

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

Actions #8

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

Actions #9

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

Actions #10

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

Actions #11

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

Actions #12

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

Actions #13

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

Actions #14

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

Actions #15

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

Actions #16

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

Actions #17

Updated by Helmut Hummel over 9 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #18

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF