Bug #58288

Cache that write absolute paths needs PATH_site in cache identifier

Added by Helmut Hummel over 1 year ago. Updated about 1 year ago.

Status:Resolved Start date:2014-04-28
Priority:Must have Due date:
Assigned To:- % Done:

100%

Category:- Spent time: -
Target version:-
TYPO3 Version:6.2 Is Regression:No
PHP Version: Sprint Focus:
Complexity:

Description

The package cache writes paths to extension directories (TYPO3_LOADED_EXT) into the cache.

When calling e.g. a TYPO3 cli script from a different directory (due to different mounts) and this
cache does not exist yet, it will be written with absolute paths taken from PATH_site of the cli
When then calling the website, many things will fail as relative path calculations are done with the
current PATH_site

The easiest way to tackle this issue, is to make the caches depend on PATH_site, like it is for ext_tables and ext_localconf caches


Related issues

related to Core - Bug #60737: Symlinks as Document roots are breaking the cache Resolved 2014-08-01
duplicated by Core - Bug #59088: PathUtility::stripPathSitePrefix() fails with symlinked T... Closed 2014-05-24
duplicated by Core - Bug #58952: Inconsistent extension/package relative paths Closed 2014-05-20
duplicated by Core - Bug #60224: Package Paths should be relative to TYPO3_site Closed 2014-07-10

Associated revisions

Revision d3c95a1c
Added by Helmut Hummel about 1 year ago

[BUGFIX] Use PATH_site in cache identifier for package cache

The package cache writes paths to extension directories
(TYPO3_LOADED_EXT) into the cache.

This will result in wrong caches when the same
TYPO3 instance is called from a different absolute
directory e.g. from a different mount or symlink.

To avoid this, the cache identifier now includes
PATH_site which is the current absolute path
of the TYPO3 instance.

Additionally we now only include the modification
time of the package states file instead of the
md5 of the complete content into account, which should
be much faster and also enough.

Resolves: #58288
Releases: 6.2, 6.3
Change-Id: I7c8de41c608beab282f2b8bbeab39f257a9a6a6f
Reviewed-on: https://review.typo3.org/31565
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Stefan Neufeind
Tested-by: Stefan Neufeind

Revision 9f6150fa
Added by Helmut Hummel about 1 year ago

[BUGFIX] Use PATH_site in cache identifier for package cache

The package cache writes paths to extension directories
(TYPO3_LOADED_EXT) into the cache.

This will result in wrong caches when the same
TYPO3 instance is called from a different absolute
directory e.g. from a different mount or symlink.

To avoid this, the cache identifier now includes
PATH_site which is the current absolute path
of the TYPO3 instance.

Additionally we now only include the modification
time of the package states file instead of the
md5 of the complete content into account, which should
be much faster and also enough.

Resolves: #58288
Releases: 6.2, 6.3
Change-Id: I7c8de41c608beab282f2b8bbeab39f257a9a6a6f
Reviewed-on: https://review.typo3.org/31580
Reviewed-by: Stefan Neufeind <>
Tested-by: Stefan Neufeind <>

History

#1 Updated by Stefano Kowalke about 1 year ago

I encounter the same issue. A possible reason might be a two disk setup. I have a SSD with the OS and a HDD with my $HOME folder, where the $HOME folder on the SSD is just a symlink to the one on the HDD.

$ ll /Users
lrwxr-xr-x   1 root          admin    23B 15 Jul  2013 sok -> /Volumes/HDD/Users/sok/

So while PATH_site get filled with /Volumes/HDD/Users/Sites/TYPO3/www.introduction.dev, all other functions determine this path /Users/sok/Sites/TYPO3/www.introduction.dev/.

#2 Updated by Gerrit Code Review about 1 year ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/31565

#3 Updated by Gerrit Code Review about 1 year ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/31565

#4 Updated by Gerrit Code Review about 1 year ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/31565

#5 Updated by Gerrit Code Review about 1 year ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/31565

#6 Updated by Gerrit Code Review about 1 year ago

Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/31580

#7 Updated by Helmut Hummel about 1 year ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF