Bug #47758
ext:news fails with 6.2
Status: | Resolved | Start date: | 2013-04-30 | |
---|---|---|---|---|
Priority: | Should have | Due date: | ||
Assigned To: | - | % Done: | 0% |
|
Category: | Core | |||
Target version: | 2.2.0 | |||
TYPO3 Version: | 6.2 | Branch: | ||
PHP Version: | 5.3 | Complexity: | ||
Has patch: | No | Is Regression: |
Description
ext_autoload in ext:news requires Classes/Cache/ClassCacheBuilder.php that in turn manually requires PATH_t3lib . 'utility/class.t3lib_utility_versionnumber.php' in its init() method. This file will not exist anymore in 6.2, and the autoloader is not yet initialized in ext_autoload (for obvious reasons) at this point. Thus, the code then fails with
PHP Fatal error: Class 'TYPO3\CMS\Core\Utility\VersionNumberUtility' not found in /var/www/domains/schwarzbu.ch/vhosts/foo/htdocs/typo3conf/ext/news/Classes/Utility/Compatibility.php on line 45
A quick hack to solve this is
»···protected function init() { »···»···$t3libUtilityVersionNumber = PATH_t3lib . 'utility/class.t3lib_utility_versionnumber.php'; »···»···if (@is_file($t3libUtilityVersionNumber)) { »···»···»···require_once($t3libUtilityVersionNumber); »···»···} else { »···»···»···require_once \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('core') . 'Classes/Utility/VersionNumberUtility.php'; »···»···} »···»···require_once(t3lib_extMgm::extPath('news', 'Classes/Utility/Compatibility.php')); »···}
This in only a hack, own code in ext_autoload except returning some static array is highly discouraged and can fail at any point.
Related issues
Associated revisions
[BUGFIX] Fix CacheBuilder for 6.2
Change-Id: I5619d7f695974a83bacdb5b89688feab9ec85a16
Resolves: #47758
Reviewed-on: https://review.typo3.org/20445
Reviewed-by: Georg Ringer
Tested-by: Georg Ringer
History
#1 Updated by Gerrit Code Review over 2 years ago
- Status changed from New to Under Review
Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/20445
#2 Updated by Georg Ringer over 2 years ago
- Category set to Core
- Status changed from Under Review to Resolved
- Target version set to 2.2.0