Bug #17132
closedFunction linkWrapFile() in file class.file_list.inc uses wrong PATH prefix.
0%
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
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.
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.
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)