Project

General

Profile

Actions

Bug #51031

closed

Not appropriate check for data type in Redis caching backend

Added by Viktor Livakivskyi over 10 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Caching
Target version:
-
Start date:
2013-08-12
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.0
PHP Version:
5.4
Tags:
Complexity:
medium
Is Regression:
Sprint Focus:

Description

I've started using Redis as caching backend for all caches, that are using db. So far so good, but now I'm experiencing issues with workspaces caches.
Whenever I do some change, that involves processCmdmap_afterFinish() hook (i.e. mark BE user as "admin"), I'me getting an exception:

#1279578078: The specified tag is of type "integer" but a string is expected. 

The stacktrace is following:
6 TYPO3\CMS\Core\Cache\Backend\RedisBackend::flushByTag(0)
5 TYPO3\CMS\Core\Cache\Frontend\AbstractFrontend::flushByTag(0)
4 TYPO3\CMS\Workspaces\Hook\DataHandlerHook::flushWorkspaceCacheEntriesByWorkspaceId(0)
3 TYPO3\CMS\Workspaces\Hook\DataHandlerHook::processCmdmap_afterFinish(TYPO3\CMS\Core\DataHandling\DataHandler)
2 TYPO3\CMS\Core\DataHandling\DataHandler::process_cmdmap()
1 TYPO3\CMS\Backend\Controller\EditDocumentController::processData()

So, the problem is in fact, that LIVE workspace has id=0, and this is incorrect tag name for Redis.

Actions #1

Updated by Philipp Gampe over 10 years ago

  • Status changed from New to Accepted
  • Complexity set to medium

The use of the caching framework should be adjusted inside workspaces. E.g. use "id-0" instead of just "0".

Actions #2

Updated by Thorsten Kahler over 10 years ago

Using integers as tags ain't too clever, that's right.

Nevertheless:
  • the implementation in \TYPO3\CMS\Core\Cache\Backend\RedisBackend differs from all other backends in this regard: all other caching backends accept integer tags
  • the validity of a tag is checked in \TYPO3\CMS\Core\Cache\Frontend\AbstractFrontend::isValidTag() already
  • Redis::sAdd() accepts integers as values of sAdd() method, see unit test implementation in Redis_Test::testsInter()
Actions #3

Updated by Gerrit Code Review over 10 years ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/23191

Actions #4

Updated by Gerrit Code Review over 10 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/23191

Actions #5

Updated by Gerrit Code Review over 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 https://review.typo3.org/23191

Actions #6

Updated by Gerrit Code Review over 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 https://review.typo3.org/23191

Actions #7

Updated by Moritz Ahl almost 10 years ago

Can someone finally review and merge this? I would like to stop having to patch every release for one Year now.

Actions #8

Updated by Gerrit Code Review almost 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 https://review.typo3.org/23191

Actions #9

Updated by Gerrit Code Review over 9 years ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/23191

Actions #10

Updated by Gerrit Code Review almost 9 years ago

Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/23191

Actions #11

Updated by Thorsten Kahler almost 9 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #12

Updated by Moritz Ahl over 8 years ago

I still have the issue in TYPO3 6.2.14 when associating a FAL storage to a backend user as Filemount and Workspace sysext ist enabled. With disabled workspace extension, everything works fine.

Actions #13

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF