Bug #35212
closed
Compressor: filemtime(): stat failed in Help > About TYPO3
Added by Xavier Perseguers over 12 years ago.
Updated about 6 years ago.
Category:
Content Rendering
Description
I first thought it was related to unprivilege Backend user access but the same happens for admin user when opening Help > About TYPO3:
PHP Warning: filemtime() [function.filemtime]: stat failed for
/path/to/typo3/xtjs/adapter/ext/ext-base.js in
/path/to/typo3_src/t3lib/class.t3lib_compressor.php line 470
After digging into the code, I figured out that t3lib_Compressor
fails to correctly compute relative path from main directory for when compressing JS and CSS files from Core that do not contain the typo3/
prefix but start with either contrib/
or sysext/
.
Files
To see the problem, one should configure typo3conf/localconf.php
:
$TYPO3_CONF_VARS['SYS']['exceptionalErrors'] = 30711;
- Status changed from New to Needs Feedback
Here's the patch to fix that, I'd like to know if this can be reproduced by other persons, and on which TYPO3 versions.
diff --git a/t3lib/class.t3lib_compressor.php b/t3lib/class.t3lib_compressor.php
index ec560c9..e8f1ecc 100644
--- a/t3lib/class.t3lib_compressor.php
+++ b/t3lib/class.t3lib_compressor.php
@@ -490,6 +490,11 @@ class t3lib_Compressor {
}
}
+ // if the file is from a special TYPO3 internal directory, add the missing typo3/ prefix
+ if (is_file(PATH_site . TYPO3_mainDir . $filename)) {
+ $filename = TYPO3_mainDir . $filename;
+ }
+
// build the file path relatively to the PATH_site
$backPath = str_replace(TYPO3_mainDir, '', $this->backPath);
$file = str_replace($backPath, '', $filename);
- Assignee deleted (
Xavier Perseguers)
I can not reproduce this on master currently. I will check if I have any debug stuff enabled in a minute, but I must file another bug first ;)
OK, no debug enabled and I can not reproduce on 4.7 either (all on Fedora 16).
- Status changed from Needs Feedback to Under Review
I just checked, the code does not differ between 4.6 and master except for the missing: http://review.typo3.org/9872
Please check again after applying that one.
So this must effect either all branches or be a local problem. I did not do a complete research, but I think your patch should be applied to 4.6 and up or we need to find out what is the difference.
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
For the sake of completeness, here a screenshot of the reproduction of this warning in current latest version of TYPO3 4.6 (thus without this committed patch):
- Status changed from Resolved to Closed
Also available in: Atom
PDF