Project

General

Profile

Actions

Bug #59088

closed

PathUtility::stripPathSitePrefix() fails with symlinked TYPO3-dirs

Added by Stefan Neufeind over 10 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Miscellaneous
Target version:
-
Start date:
2014-05-24
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
medium
Is Regression:
No
Sprint Focus:

Description

  • TYPO3 is installed in /var/www/html/www1
  • But the (other) vhost that gets called by the browser is /var/www/html/somefoobar, which is a symlink to /var/www/html/www1
    (a separate website but on the same TYPO3-installation)
  • In an extension a call like siteRelPath('extensionmanager') will return /var/www/html/somefoobar/typo3/sysext/extensionmanager/
  • while PATH_site used in PathUtility::stripPathSitePrefix() equals to /var/www/html/www1/

Thus the returned path from siteRelPath will be 'oobar/typo3/sysext/extensionmanager/' leading to an error.


Related issues 1 (0 open1 closed)

Is duplicate of TYPO3 Core - Bug #58288: Cache that write absolute paths needs PATH_site in cache identifierClosed2014-04-28

Actions
Actions #1

Updated by Philipp Gampe over 10 years ago

  • Category set to Miscellaneous
  • Status changed from New to Accepted
  • Priority changed from Should have to Must have
  • Complexity set to medium

I guess we need to use relative paths or take PATH_site into account while calculating the cache identifier.

Actions #2

Updated by form4 GmbH & Co. KG over 10 years ago

You can reproduce this in TYPO3 6.2.3 with a setup like this:


page = PAGE
page {
10 = TEXT
10.value = Hello1
includeCSS {
file1 = EXT:myext/screen.css
}
}

the two hosts: extdev.domain.de, extdev-multi.domain.de

Copy this in the other root page,too and then make sure you have two domains (one as a folder and the other with a symlink to the same folder).

Example:

/www/extdev
/www/extdev-multi (symlink to /www/extdev)

  1. Delete Cache in Install-Tool
  2. Call the domain extdev-multi.domain.de - and you see the screen.css is included.
  3. Call the domain extdev.domain.de - and there is no screen-css included.

The function \TYPO3\CMS\Core\Utility\PathUtility::stripPathSitePrefix(self::extPath($key) creates a relative path with the current PATH_site constant and a cached package path value with a substring. After clearing the cache - in the first step - TYPO3 produces a path depending on the host of extdev-multi.domain.de: with PATH_site = /www/extdev-multi.

This leads to cached package path like this: /www/extdev-multi/htdocs/typo3conf/ext/myext/

Calling extdev.domain.de stripPathSitePrefix() the value of PATH_site is now: /www/extdev/.

Now we have a cached package path with extdev-multi but the substring happens with the string length of /www/extdev/.

The expected relative path would be: "typo3conf/ext/myext/screen.css"

but the actual result is now: "htdocs/typ3conf/ext/myext/screen.css"

Actions #3

Updated by Helmut Hummel over 10 years ago

  • Status changed from Accepted to Closed

closing as duplicate

Actions

Also available in: Atom PDF