Project

General

Profile

Actions

Bug #22027

closed

Method filelink of tslib_content uses 'target' instead of 'fileTarget'

Added by Xavier Perseguers almost 15 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2010-01-29
Due date:
% Done:

0%

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

Description

Method filelink prepares the typolink configuration with a parameter 'target'. However when dealing with files, the "target" attribute should be named "fileTarget". See class.tslib_content.php around line 5950:

$target = isset($conf['fileTarget']) ? $conf['fileTarget'] : $GLOBALS['TSFE']->fileTarget;
if ($conf['fileTarget.']) {$target = $this->stdWrap($target, $conf['fileTarget.']);}
if ($forceTarget) {$target=$forceTarget;}
$this->lastTypoLinkTarget = $target;

Solution: use 'pageTarget' instead.

How to reproduce (example). Try to configure tt_news to generate links for list of files with a target _blank :

plugin.tt_news.newsFiles.target = _blank

The configuration 'newsFiles.' is passed as-this to method filelink(). Now links are not generated with target "_blank".

Sole solution ATM to have those links opening in a blank browser window is to force all filelinks to use a _blank target (with config.fileTarget = _blank which was introduced with feature #17742).
(issue imported from #M13368)


Files

13368.diff (946 Bytes) 13368.diff Administrator Admin, 2010-01-29 14:43
Actions #1

Updated by Xavier Perseguers almost 15 years ago

Committed to:

- trunk (rev. 6839)
- 4-3 (rev. 6840)

Actions #2

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF