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

Dmitry Dulepov typo3 at accio.lv
Mon Aug 14 11:19:55 CEST 2006


This is SVN patch request.

Ref: http://bugs.typo3.org/view.php?id=4037

Branches: 4.0 and trunk

Summary: Google AdWords adds parameter to the destination URL to help 
site owners identify visits from AdWords. URL looks like: 
"http://berni.calis.lv/?gclid=COjNhtPk3oYCFQZWMAodOVur4w". Unfortunately 
  setIDfromArgV() function in tslib_fe tries to use the first parameter 
block in query string as alias. Thus if query string does not start with 
ampersand character (which is wrong anyway!), it will treat 
"gclid=COjNhtPk3oYCFQZWMAodOVur4w" as alias and typo3 will display "not 
found" message.

Solution: since aliases cannot contain equals sign, check for this sign 
and do not treat parameter block as alias. Patch is tested on the live site.

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"

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.)
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: alias_patch.txt
Url: http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20060814/896f5a1e/attachment.txt 

More information about the TYPO3-team-core mailing list