[TYPO3-dev] Strange RealURL Problem
Patrick Lobacher
plobacher at n-o-g.de
Wed May 27 12:12:43 CEST 2009
Hi Peter,
perhaps my description was not clear enough:
1.) I have (lets say) 30 diffent domains in one pagetree - each
containing a proper domain records, pages, content, ... and - this is
important - each of the domains have RealURL enabled
2.) The editor dont want to login into each of the domains typo3 link
but in just one installation where he can edit all domains - This works
of course. I will call this domain (where everyone logs in) the "preview
domain" as all previews will be started from here (if you click "show"
in the page tree). This can be a totally different IP adress (in our
case) but it makes no difference if you take one of the metioned 30 domains.
3.) If you change something in the backend, then open your browser and
type in the domain (where you have changed something) manually - then
everythings works as expected - especially the RealURL generation of links
4.) But if you click the preview link ("show") you will be forwarded to
the frontend with a link like
http://www.typo3domain.com/index.php?id=pageid (where typo3domain.com is
the domain where the typo3 backend is called from - the preview domain).
Of course you will get the correct output - no problem. But the
calculated RealURL rootpage_id is (in the most cases) wrong (and
additionally stored in the DB too - so that the page couldn't be reached
with the normal way too). If you clear the entry or change it manually
to the correct one in the DB - everything works fine.
This happens because of the fact that:
- The calculation of the rootpage_id comes from the realurl config. In
this config I am forced to specify a rootpage_id for every domain I want
to use. Even if I disble realurl for the preview domain.
Something like:
$TYPO3_CONF_VARS['EXTCONF']['realurl']['www.typo3domain.com']['pagePath']['rootpage_id']
= 1;
- In this config I have to decide to which rootpage_id I want my preview
domain connected. If I have 30 domains (with 30 rootpage_ids of course)
I have to decide which of them I take
- Exact in the moment I preview a page the rootpage_id of the preview(!)
domain will be saved together with the page_id. And this is in 29 of 30
cases wrong (given that I habe 30 Domains in one page tree)
Now we are working on a setup, that realurl will completely disabled if
the domain is the preview domain (ts condition). So if you enter a
preview link you habe no realurl and so no wrong rootpage_id/page_id
combination can be saved. If you view it from the domain name everything
works fine with RealURL enabled.
Cheers
Patrick
Peter Niederlag schrieb:
> Hello Patrick,
>
> Patrick Lobacher schrieb:
>> Peter Niederlag schrieb:
> [...]
>> yes you are right - the best solution (till TYPO3 has a proper preview
>> handling) seems to be to switch of RealURL completely for the preview
>> host - so it is possible to preview the content pages and if you want to
>> check the RealURL setting than you have to go to the real domainname and
>> test it from there...
>
> Sry, but I don't see why to blame TYPO3 for this. Making the same
> content/page available under different domains is considered bad
> practice and doesn't really make sense.
>
> Also it makes calcualting the realUrl really tough as it changes the
> references(rootPage).
>
> You can even easily spoil your site by this setup as it puts wrong
> realurls/pages into cache if you don't disable realurl on the preview host.
>
> Why do you need that "preview host" in first place?
>
> If it is just for the login status in BE you should rather work on that
> issue, which is to be easily solved with subdomains. Don't know about
> different domains.
>
> Cheers,
> Peter
More information about the TYPO3-dev
mailing list