Bug #47269
closedRuntimeException: 'Could not create directory "typo3temp/Cache/Data/t3lib_l10n/
100%
Description
When saving a TCA-based element an uncatched RuntimeException was thrown:
Fatal error: Uncaught exception 'RuntimeException' with message 'Could not create directory "###T3PATH###/typo3temp/Cache/Data/t3lib_l10n/"!' in ###T3PATH###/typo3/typo3_src-6.0.4-fixed/typo3/sysext/core/Classes/Cache/Backend/SimpleFileBackend.php on line 197
RuntimeException: Could not create directory "###T3PATH###/typo3temp/Cache/Data/t3lib_l10n/"! in ###T3PATH###/typo3/typo3_src-6.0.4-fixed/typo3/sysext/core/Classes/Utility/GeneralUtility.php on line 2669
Call Stack:
0.0003 324304 1. {main}() ###T3PATH###/typo3/typo3_src-6.0.4-fixed/typo3/alt_doc.php:0
0.4594 19799672 2. TYPO3\CMS\Backend\Controller\EditDocumentController->processData() ###T3PATH###/typo3/typo3_src-6.0.4-fixed/typo3/alt_doc.php:54
0.4851 22140816 3. TYPO3\CMS\Core\DataHandling\DataHandler->process_datamap() ###T3PATH###/typo3/typo3_src-6.0.4-fixed/typo3/sysext/backend/Classes/Controller/EditDocumentController.php:444
23.7144 37483440 4. TYPO3\CMS\Core\DataHandling\DataHandler->insertDB() ###T3PATH###/typo3/typo3_src-6.0.4-fixed/typo3/sysext/core/Classes/DataHandling/DataHandler.php:1054
23.7295 37495240 5. TYPO3\CMS\Core\DataHandling\DataHandler->clear_cache() ###T3PATH###/typo3/typo3_src-6.0.4-fixed/typo3/sysext/core/Classes/DataHandling/DataHandler.php:5646
24.5445 38056616 6. TYPO3\CMS\Core\DataHandling\DataHandler->clear_cacheCmd() ###T3PATH###/typo3/typo3_src-6.0.4-fixed/typo3/sysext/core/Classes/DataHandling/DataHandler.php:6678
24.6212 38057688 7. TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction() ###T3PATH###/typo3/typo3_src-6.0.4-fixed/typo3/sysext/core/Classes/DataHandling/DataHandler.php:6799
24.6213 38059416 8. call_user_func_array() ###T3PATH###/typo3/typo3_src-6.0.4-fixed/typo3/sysext/core/Classes/Utility/GeneralUtility.php:4022
24.6213 38059864 9. TYPO3\CMS\Lang\LanguageCacheClearer->clearCache() ###T3PATH###/typo3/typo3_src-6.0.4-fixed/typo3/sysext/core/Classes/Utility/GeneralUtility.php:4022
24.6236 38060064 10. TYPO3\CMS\Core\Cache\Frontend\AbstractFrontend->flush() ###T3PATH###/typo3/typo3_src-6.0.4-fixed/typo3/sysext/lang/Classes/LanguageCacheClearer.php:66
24.6236 38060064 11. TYPO3\CMS\Core\Cache\Backend\FileBackend->flush() ###T3PATH###/typo3/typo3_src-6.0.4-fixed/typo3/sysext/core/Classes/Cache/Frontend/AbstractFrontend.php:122
24.6244 38060008 12. TYPO3\CMS\Core\Cache\Backend\SimpleFileBackend->createFinalCacheDirectory() ###T3PATH###/typo3/typo3_src-6.0.4-fixed/typo3/sysext/core/Classes/Cache/Backend/FileBackend.php:292
24.6244 38060008 13. TYPO3\CMS\Core\Utility\GeneralUtility::mkdir_deep() ###T3PATH###/typo3/typo3_src-6.0.4-fixed/typo3/sysext/core/Classes/Cache/Backend/SimpleFileBackend.php:195
24.6247 38060176 14. TYPO3\CMS\Core\Utility\GeneralUtility::createDirectoryPath() ###T3PATH###/typo3/typo3_src-6.0.4-fixed/typo3/sysext/core/Classes/Utility/GeneralUtility.php:2639
Updated by Bernhard Kraft about 10 years ago
This also occurs with any other arbitrary (cache) directory because of a possible race condition in "GeneralUtility::createDirectoryPath()".
1. The method first uses "is_dir()" to check whether the directory to be created does not already exist.
2. It then uses a loop to determine the first directory to be created.
3. It then uses "mkdir(..., ..., TRUE)" where the third parameter being TRUE means to create the directory recursive (i.e.: deep).
4. If the "mkdir" fails an exception is thrown.
If between steps 1 and 3 the directory gets created by another PHP process the "mkdir()" will fail and cause an exception.
Solution: Before throwing the exception check that the directory does really not exist.
Updated by Gerrit Code Review about 10 years ago
- Status changed from New 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 http://review.typo3.org/32881
Updated by Gerrit Code Review about 10 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/32881
Updated by Gerrit Code Review about 10 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/32881
Updated by Gerrit Code Review about 10 years ago
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/32881
Updated by Gerrit Code Review about 10 years ago
Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/32881
Updated by Gerrit Code Review about 10 years 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 http://review.typo3.org/33237
Updated by Anonymous about 10 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 2e7e5f3055cd91e71b4aedbcd1a7b8acb710d37d.