Project

General

Profile

Actions

Bug #17132

closed

Function linkWrapFile() in file class.file_list.inc uses wrong PATH prefix.

Added by Patrick Rodacker over 17 years ago. Updated over 14 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
-
Target version:
Start date:
2007-03-20
Due date:
% Done:

0%

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

Description

one of our developers encountered a problem when trying to view a css file from within the filelist module und her user environment. The absolute url of the file was similar to:

http://mydomain.com/~username/project/fileadmin/templates/css/file.css

When trying to view the file by clicking the files name, the url of the newly opened window was somethink like this:

http://mydomain.com/project/fileadmin/templates/css/file.css

after having a closer look, I was able to get to the bottom of it:

The function linkWrapFile() in file class.file_list.inc takes the absolute path of the file in the filesystem and strips of the string of the document root. The remaining path is passed to the javascript function openUrlInWindow(). If you have a project setting where the location of the file in the filesystem is not similar to the location representation of the webserver, the file can't be found and the newly opened window shows an error.

I would suggest to pass the absolute path to the javascript function including the TYPO3_SITE_URL.

I will include a patch later.

(issue imported from #M5260)


Files

bug_5260.diff (790 Bytes) bug_5260.diff Administrator Admin, 2007-03-20 15:50
5260_v2.patch (806 Bytes) 5260_v2.patch Administrator Admin, 2009-12-25 10:26
Actions #1

Updated by Patrick Rodacker over 17 years ago

I missed some words in the summary, because I've been distracted. So if someone could complete it to "... does not use TYPO3_SITE_URL" or something more descriptive.

Actions #2

Updated by Benni Mack almost 15 years ago

Hey Patrick,

your patch did not work for me, however I figured that PATH_site has to be used instead of DOCUMENT_ROOT.

I had a setup where my typoinstallation was under

http://localhost/~benni/typo3trunk/

and PATH_site worked. I attached my patch which works for me. I also sent it to the core list.

Actions #3

Updated by Benni Mack almost 15 years ago

Commited this patch to trunk (rev. 6694)
Commited this patch to TYPO3_4-3 (rev. 6695)
Commited this patch to TYPO3_4-2 (rev. 6696)

Actions

Also available in: Atom PDF