Project

General

Profile

Actions

Bug #34117

closed

Usage of caching framework broken in TYPO3 4.5

Added by Andreas Kiessling about 12 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Must have
Assignee:
Category:
Workspaces
Target version:
Start date:
2012-02-20
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
4.5
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Since the caching framework was heavily refactored in 4.6, this bug only happens in 4.5:

  1. 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.
  2. 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

34117_v1.patch (1.6 KB) 34117_v1.patch Andreas Kiessling, 2012-02-20 18:09

Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #27543: Adapt cache configuration to 4.6Closed2011-06-19

Actions
Has duplicate TYPO3 Core - Task #42293: Please check for array, to avoid strict mode warningsClosed2012-10-23

Actions
Actions

Also available in: Atom PDF