Project

General

Profile

Actions

Bug #34117

closed

Usage of caching framework broken in TYPO3 4.5

Added by Andreas Kießling almost 13 years ago. Updated about 7 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 Kießling, 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 #1

Updated by Andreas Kießling almost 13 years ago

I guess i should have mentioned workspaces in the subject...

Actions #2

Updated by Susanne Moog almost 13 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
Actions #4

Updated by Vasile Oancea over 12 years ago

  • Target version set to 4.5.14
Actions #5

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!

Actions #6

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
Actions #7

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

Actions #8

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

Actions #9

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.

Actions #10

Updated by Michael Stucki almost 11 years ago

  • Category changed from Bugs to Workspaces
Actions #11

Updated by Michael Stucki almost 11 years ago

  • Project changed from 624 to TYPO3 Core
  • Category changed from Workspaces to Workspaces
Actions #12

Updated by Riccardo De Contardi about 7 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF