Issue Bug Closed

#25317Typolink fails to link between two non-default page types

Franz G. Jahn 03/14/11, 14:24 updated 04/12/11, 18:45

Description

If you try to link from a page type with typeNum != 0 to another page type using typolink the parameter notation pageId,typeNum described in tsref (http://typo3.org/documentation/document-library/core-documentation/doc_core_tsref/4.3.2/view/1/5/#id2507605), the link will contain the current type as well.

Steps to reproduce:
Take an environment with three different page types (e.g. default (type=0), print version (type=98), plaintext (type=42)).
Create a text contet element containing three link-tags (assuming pageID=23):
<link>test normal
<link>test print
<link>test plaintext

Now, if you take a look on the output of the plaintext type, the generated links will look as follows:
http://example.com/index.php?id=23&type=98&type=42

Addionally, type=0 won’t be considered at all.

Solution:
t3lib_tstemplate::linkData should consider type parameter during “uniqueLinkVars”-Handling

Additionally, $typeNum should not be considered as a boolean variable. It should be checked, whethere is $typeNum contains an integer or not.

Improvement: After exploding the link parameters, it should be checked whether type is explicitiy set to “0”. If the parameters contain type=0, the type parameter can be left out.

Proposed patch appended. Problem seems to affect all TYPO3 Versions

(issue imported from #M17937)

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.