Project

General

Profile

Actions

Bug #14221

closed

config.stat_apache_pagenames code [type] ends up empty

Added by old_pekue over 20 years ago. Updated over 18 years ago.

Status:
Closed
Priority:
Should have
Category:
Backend API
Target version:
-
Start date:
2004-07-02
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
3.6.1
PHP Version:
4
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

on line 1288 of class.tslib_fe.php:
$pageName = str_replace('[type]',$this->page['type'],$pageName);
tslib_fe::getConfigArray() refers to $this->page['type'] which is empty

i think the line should be changed to
$pageName = str_replace("[type]",$GLOBALS['TSFE']->type,$pageName);

(issue imported from #M187)


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #14419: Log writes wrong pathsClosedMichael Stucki2004-11-26

Actions
Actions #1

Updated by Ingmar Schlecht over 20 years ago

Could you check if the following works:

$pageName = str_replace("[type]",$this->type,$pageName);

Actions #2

Updated by Ingmar Schlecht over 20 years ago

Peter, I haven't got a reply from you, so the bug will probably not be fixed in 3.7.

Actions #3

Updated by old_pekue over 20 years ago

hey ingmar,
sorry - i overlooked the bugnote youve added: youre right:
$pageName = str_replace("[type]",$this->type,$pageName);
would work as well.
thanks for fixing
pekue

Actions #4

Updated by Schmid Valentin almost 20 years ago

The bug is still not fixed in 3.7. But ingmars Bugfix works correct. Thanks.

There's also 'nice to have' (or Bug?) for 'config.stat_apache_pagenames':
The code [title] does not produce the same result as
'config.simulateStaticDocuments_addTitle = 30'
This would be very nice. You'll see the difference if you have special
chars in the Document-Title (like german Umlauts)

This is the relevant Code for 'config.stat_apache_pagenames':
$shortTitle = substr(ereg_replace('[^\.[:alnum:]_-]','_',$this->page['title']),0,30);

This is the relevant Code for 'config.simulateStaticDocuments_addTitle = 30'
(Remark: $inTitle is the same as $this->page['title'])
$out = '';
if ($titleChars) {
$out = $this->csConvObj->specCharsToASCII($this->renderCharset, $inTitle);
$out= ereg_replace('[^[:alnum:]_-]','_',trim(substr($out,0,$titleChars)));
$out= ereg_replace('_*$','',$out);
$out= ereg_replace('^_*','',$out);
if ($out) $out.='.';
}

(I think best would be to place the conversion in a function)

Actions #5

Updated by Michael Stucki almost 19 years ago

Fixed in CVS.

Actions

Also available in: Atom PDF