[TYPO3-core] RFC: Bug #4590: addQueryString will use QUERY_STRING, which might not be correct

Ernesto Baschny [cron IT] ernst at cron-it.de
Wed Sep 12 11:33:05 CEST 2007


Hi,

this is a SVN patch request.

Branch: trunk


Problem:
With typolink's addQueryParams = 1 we expect it to work exactly like
with .method = GET. This is not the case, as it will work directly with
QUERY_STRING, which might not be correctly set after transformations in
the URL have been made. For example RealURL will only set _GET, and
leave QUERY_STRING untouched, which I think is ok, as one might want to
work with the "real" QUERY_STRING.

So for example a site with tt_news and a setup with RealURL which hides
tt_news _GET parameters in the URL, one cannot make a "print link" with
this TypoScript:

temp.print_url = TEXT
temp.print_url {
	typolink {
		returnLast = url
		addQueryString = 1
		parameter.data = TSFE:id
		additionalParams = &print=1
	}
}

This will ignore all _GET parameters which were transformed by RealURL.

Solution in TypoScript is to always include

		addQueryString.method = GET

but then the default solution is useless. So...


Solution:
Is to work only with _GET when adding parameters with addQueryParams.
The "shortcut" to work with QUERY_STRING directly doesn't seem to
provide any benefit.


Reference:
http://bugs.typo3.org/view.php?id=4590
http://bugs.typo3.org/view.php?id=6051

Both bugs marked for "RealURL", but the problem relies on the above
mentioned facts, which is why I think a core patch is required.


Cheers,
Ernesto
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bug-4590-tslib_content-getQueryArguments-fixrealurl.diff
Type: text/x-diff
Size: 1520 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20070912/f42d1345/attachment.diff 


More information about the TYPO3-team-core mailing list