Bug #45374
closedabsRefPrefix and File Storages
0%
Description
We encountered a problem with file storages that are not equal to fileadmin. Wie included css or javascript files via the includeCSS or includeJS file and the absRefPrefix part is not prepended to them. If the file storage points to fileadmin, the absRefPrefix is prepended.
Example:
config.absRefPrefix = / page.includeCSS.css1 = Resources/Public/StyleSheets/style1.css page.includeCSS.css2 = fileadmin/css/style2.css
The output is:
<link rel="stylesheet" type="text/css" href="Resources/Public/StyleSheets/style1.css" media="all" /> <link rel="stylesheet" type="text/css" href="/fileadmin/css/style2.css" media="all" />
The same problem occurs with javascript files.
I can avoid this problem if I use:
page.includeCSS.css1 = /Resources/Public/StyleSheets/style1.css
But this is not the correct handling, I think.
Updated by Andreas Wolf almost 12 years ago
- Category set to File Abstraction Layer (FAL)
- Status changed from New to Accepted
Updated by Andreas Wolf almost 12 years ago
This most likely comes from some automagic path prepending code in the page rendering mechanism. This mechanism should be disabled for files from FAL and instead the URLs generated there should be used.
Updated by Chris Müller over 11 years ago
Okay, I found a configuration parameter in the install tool: [FE][additionalAbsRefPrefixDirectories]. Here you can define which directories should respect config.absRefPrefix.
But it would be nice if absRefPrefix checks the file storages and append the paths automatically to [FE][additionalAbsRefPrefixDirectories].
Updated by Bernd Wilke over 11 years ago
I would like to have an individual absRefPrefix per filestorage. my usecase:
I mount an imageserver parallel to fileadmin, where TYPO3 (and editors) got only read-access. in the end all files from this storage should have an subdomain-prefix like http://img.domain.tld/ as this is a complete different server. and it would be so much easier if the correct domain is prepended automatic.
Updated by Philipp Gampe over 11 years ago
FAL has an API to get the storage: getPublicUrlForFile()
http://docs.typo3.org/typo3cms/FileAbstractionLayerReference/Developers/Api/StorageApi.html
Updated by Frans Saris over 10 years ago
- Status changed from Accepted to Needs Feedback
- Is Regression set to No
Is this still an issue in 6.2?
Updated by Alexander Opitz about 10 years ago
- Status changed from Needs Feedback to Closed
No feedback within the last 90 days => closing this issue.
If you think that this is the wrong decision or experience this issue again, then please write to the mailing list typo3.teams.bugs with issue number and an explanation or open a new ticket and add a relation to this ticket number.