[TYPO3-english] caching of config.baseurl on multiple TYPO3 enviroments.

bernd wilke t3ng at bernd-wilke.net
Mon Jul 14 12:00:05 CEST 2014


Am 14.07.14 11:33, schrieb De Contardi Riccardo:
> Hi all, I've got a little question for you:
>
> I and my team tried to manage a new TYPO3 project in this way:
>
> Three developers have a TYPO3 distribution on their local machine (a
> laptop); each of them have configured a different host name for the
> site:e.g.
>
>
>
> http://mydevsite.it
>
> http://myotherdevsiteagain.it
>
> http://myotherurlfordevsite.it:8888
>
>
>
> But the database is in common between them: in  fact it has been
> installed on a remote machine.
>
>
>
> The folders like fileadmin and typo3conf are synchronized via Git
> between the developers .(except for LocalConfiguration.php and
> PackageStates.php)
>
>
>
> the config.baseurl=whatever has been written inside a file
> /fileadmin/LocalConfiguration/Localconfiguration.txt included in the
> Typoscript (this file is ignored by Git, too).

wrap it into conditions

domain = myglobaldomain.tld
[globalString = IENV:HTTP_HOST = myfirstdomain.tld]
domain = myfirstdomain.tld
[globalString = IENV:HTTP_HOST = myseconddomain.tld]
domain = myseconddomain.tld
[global]

for each condition a new cache-variant of each page is stored.

>
>
> My problem: it seems that TYPO3 caches the baseUrl each time I perform a
> clear cache from the backend, and it writes the baseurl of the last
> person who cleares the cache, so obviously the other two people will see
> the site "broken" (without styles).
>
> I've found that the only way to avoid this behavior is disabling the
> cache.
>
>
>
> Do you have some trick/suggestion for me? What can I do apart from
> disabling the whole cache via config.no_cache=1 or &no_cache=1 on
> querystring?
>

either your developers develop on the same installation, then they 
should use the same domain,
or they develop on different instances.
but then you should avoid to use the same database: have a reference 
installation (stage, live) from which the database is replicated to the 
individual installations (automatically on a regular basis or on demand 
by hand)


having only one database:
if one developer modifies table A and the other developer modifies table 
B they got inconsistencies in TCA.
If they both modify table C the chaos is complete.

bernd
-- 
http://www.pi-phi.de/cheatsheet.html


More information about the TYPO3-english mailing list