[TYPO3-core] RFC: Link from GoogleAdWords to typo3-based site fails due wrong alias handling

Dmitry Dulepov typo3 at accio.lv
Sat Aug 19 20:16:15 CEST 2006


Ingmar Schlecht wrote:
> Dmitry Dulepov wrote:
>> Note: it seems that such urls do not fail always. They work without this
>> patch on my localhost but do not work on production server. In any case
>> I think this patch makes better detection for aliases than current code.
>> It also solves ugly "http://something/?&no_cache=1" and makes possible
>> to use correct "http://something/?no_cache=1"
> Are you sure it's not an extension installed on your production
> environment that causes this strange behavior? I have nevery encountered
> this before and I think TYPO3 normally doesn't try to interpret the
> first parameter as an alias when it contains a "=".

Well, it does in the current code. It takes first parameter and tries to 
find alias that matches to it.

> That's why I'm a bit skeptical to your patch. Could you analyze why it
> fails on your production environment and not on your localhost?

In fact it fails on several hosts with different configurations. The 
only common things there are templavoila, css styled content and realurl.

Btw, "?&no_cache=1" even mentioned in some docs (with amoersand, I 
assume due to this behavior of alias).

In any case patch does not harm because alias may not contain equal sign.

>> +			$this->id = ($theAlias != '' && strpos($theAlias, '=') === false) ? $theAlias : 0;
> You could get rid of the outer brackets in that condition.

I can. But it looks better with them. More formal, more clear. Privately 
I prefer to even enclose everything after "=" to brackets :)

Dmitry Dulepov
ACCIO Ltd, Latvia

"It is our choices, that show what we truly are,
far more than our abilities." (A.P.W.B.D.)

More information about the TYPO3-team-core mailing list