Project

General

Profile

Actions

Bug #20831

closed

typoLink() sometime wrongly drops url

Added by Vladimir Podkovanov over 15 years ago. Updated over 14 years ago.

Status:
Closed
Priority:
Should have
Category:
Communication
Target version:
-
Start date:
2009-08-04
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.3
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

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

bug_11643.diff (1.41 KB) bug_11643.diff Administrator Admin, 2009-08-05 22:55
T3D__06-08-15-42-40-z.t3d (1.67 KB) T3D__06-08-15-42-40-z.t3d Administrator Admin, 2009-08-06 13:51
test page ver2.t3d (1.7 KB) test page ver2.t3d Administrator Admin, 2009-08-23 05:11
test page ver3.t3d (1.72 KB) test page ver3.t3d Administrator Admin, 2009-09-03 07:33
Actions #1

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

Actions #2

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
}

Actions #3

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

Actions #4

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

Actions #5

Updated by Rupert Germann about 15 years ago

FYI: committed to trunk rev 6211

Actions

Also available in: Atom PDF