[TYPO3-dev] Strange RealURL Problem

Susanne Moog typo3 at susannemoog.de
Wed May 27 21:35:33 CEST 2009


Hi,

Susanne Moog schrieb:

> 1) current trunk, two main domains: stardustUbuntu and localhost with
> domain records: I always get the preview with the domain I used for
> logging in
> 
> 2) (patched) 4.2.5, 8 domains (all subdomains of one main domain):
> sub1.example.com, sub2.example.com ... :
> The preview link gets prefixed with the domain from the first domain
> record of it's tree.
> 
> Now I'm searching for the differences (perhaps the subdomains?).

I just looked in the core and figured out what's happening. I'll try to
explain. Say you have domainA, domainB and domainC. A & B are used for
the frontend, C is only used for the backend.

Result is:
Root page A - domain record A
Root page B - domain record B

no domain record for C as you want to use that domain just for logging
in. Well... this won't work with the preview links, but as soon as you
add domain record C _anywhere_ it will work.

So if you want to get the scenario above working, just add a domain
record C after either domain record A or B (make sure it's the second
one, so it won't be taken into account for the preview).

For the techies:

$parts = parse_url(t3lib_div::getIndpEnv('TYPO3_SITE_URL'));
$dName =
t3lib_BEfunc::getDomainStartPage($parts['host'],$parts['path']) ?					
t3lib_BEfunc::firstDomainRecord(t3lib_BEfunc::BEgetRootLine($this->id))
:
'';

where getDomainStartPage makes a db query on the sys_domains table with
$parts['host'] as value for comparison.

HTH,

Susanne



-- 
Susanne Moog
NEUSTA GmbH - www.neusta.de




More information about the TYPO3-dev mailing list