Bug #20831
closedtypoLink() sometime wrongly drops url
0%
Description
tslib_cObj::typoLink() function drops url and left only section anchor in case (quote from source code):
// If sectionMark is set, there is no baseURL AND the current page is the page the link is to, check if there are any additional parameters and is not, drop the url.
But this check is not enough as if present addQueryString=1 parameter with addQueryString.method=POST or addQueryString.exclude=... then url could not be dropped as it is pointing to different page.
(issue imported from #M11643)
Files
Updated by Vladimir Podkovanov over 15 years ago
test example from real template
typolink {
parameter = #userId{GPvar:view_id}
parameter.insertData = 1
addQueryString = 1
addQueryString.exclude = view_id,expand,inlist,cHash
}
this will drop all url (index.php?id=..&searchVar=..& ...) except section #userId
Updated by Steffen Kamper about 15 years ago
isn't that wrong? should be
typolink {
parameter.data = TSFE:id
section= userId{GPvar:view_id}
section.insertData = 1
addQueryString = 1
addQueryString.exclude = view_id,expand,inlist,cHash
}
Updated by Vladimir Podkovanov about 15 years ago
Hi Steffen,
I don't know why it is not documented in TSref. From sources I know that if # followed by keyword (not number) it is considered as section so I use it.
it is the similar to feature "parameter = #" equals to "parameter.data = TSFE:id" it is known but not documented yet (though reported here #20710 to be added to TSref doc) and some devs use it
so in my case
parameter = #userId{GPvar:view_id}
parameter.insertData = 1
equals to
parameter.data = TSFE:id
section= userId{GPvar:view_id}
section.insertData = 1
it really does not matter to the issue - reported bug exists in either case, but maybe I should rewrite test page to be more clear then
Updated by Vladimir Podkovanov about 15 years ago
Hi again,
I uploaded new version of test page (ver.3) where used plain
parameter.data = TSFE:id
and
section = ...
so to avoid any uncertainty