Bug #34117
closedUsage of caching framework broken in TYPO3 4.5
100%
Description
Since the caching framework was heavily refactored in 4.6, this bug only happens in 4.5:
- tx_Workspaces_Service_GridData
The cache frontend was changed quite some time ago from the static string "t3lib_cache_frontend_StringFrontend" to "$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['sys_workspace_cache']['frontend']" without adapting setDataArrayIntoCache and getDataArrayFromCache. These two functions do unserialize and serialize on the content -> all entries end up double serialized in the db when using the t3lib_cache_frontend_VariableFrontend, since this frontend automatically does that. - tx_Workspaces_Service_Tcemain
When the stage for an element is changed, this hook initializes the workspaces_cache with hardcoded t3lib_cache_frontend_StringFrontend
Combined, this leads to an error after changing the stage for an element: the tcemain hook initializes the string frontend, a new cache entry is generated, but now only serialized once. When the grid is reloaded, the double unserializing fails and no data at all is displayed in the grid.
Solution: remove the unserialize/serialize calls in tx_Workspaces_Service_GridData and replace t3lib_cache_frontend_StringFrontend with "$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['sys_workspace_cache']['frontend']" in tx_Workspaces_Service_Tcemain
Even cleaner would probably be to move the initialization of the caching framework to a central place to get rid of the duplicate code.
Files
Updated by Andreas Kießling over 12 years ago
I guess i should have mentioned workspaces in the subject...
Updated by Susanne Moog over 12 years ago
- Subject changed from Usage of caching framework broken in TYPO3 4.5 to Workspaces: Usage of caching framework broken in TYPO3 4.5
Updated by Andreas Kießling over 12 years ago
- File 34117_v1.patch 34117_v1.patch added
Updated by Oliver Hader almost 12 years ago
- Category set to Bugs
- Status changed from New to Accepted
- Assignee set to Oliver Hader
Makes sense! Thanks for the patch!
Updated by Oliver Hader almost 12 years ago
- Subject changed from Workspaces: Usage of caching framework broken in TYPO3 4.5 to Usage of caching framework broken in TYPO3 4.5
Updated by Gerrit Code Review almost 12 years ago
- Status changed from Accepted to Under Review
Patch set 1 for branch 4.5 has been pushed to the review server.
It is available at https://review.typo3.org/17239
Updated by Gerrit Code Review almost 12 years ago
Patch set 2 for branch 4.5 has been pushed to the review server.
It is available at https://review.typo3.org/17239
Updated by Andreas Kießling almost 12 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset commit:9e7e4de7f62f1e7295316525c7d7857ad3fe1cb8.
Updated by Michael Stucki almost 11 years ago
- Category changed from Bugs to Workspaces
Updated by Michael Stucki almost 11 years ago
- Project changed from 624 to TYPO3 Core
- Category changed from Workspaces to Workspaces
Updated by Riccardo De Contardi about 7 years ago
- Status changed from Resolved to Closed