Project

General

Profile

Actions

Bug #37948

closed

additionalTreelistUpdateFields are not working

Added by Bart Dubelaar over 12 years ago. Updated about 6 years ago.

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

100%

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

Description

The list of additionalTreelistUpdateFields is not correctly appended to the updateRequiringFields array in tx_cms_treelistCacheUpdate.
The += operator only appends array elements with non-matching keys.

Holds for 4.5 - 6.0.

Actions #1

Updated by Gerrit Code Review over 12 years ago

  • Status changed from New to Under Review

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

Actions #2

Updated by Georg Ringer over 12 years ago

can you give some more info:
- what was not correctly applied
- how can this be tested

Actions #3

Updated by Bart Dubelaar over 12 years ago

In typo3/sysext/cms/tslib/hooks there is a file tx_cms_treelistCacheUpdate.php. This file hooks into TCEmain processes to clear the cache_treelist cache when necessary.
There is a setting TYPO3_CONF_VARS['BE']['additionalTreelistUpdateFields'] where fields can be added that should be evaluated in order to see if the cache_treelist cache should be cleared. See the comments in the file itself:

// extension can add fields to the pages table that require an
// update of the treelist cache, too; so we also add those
// example: $TYPO3_CONF_VARS['BE']['additionalTreelistUpdateFields'] .= ',my_field';

On line 70 an array with these additional fields was added to the updateRequiringFields array with a += operator. However, this doesn't work as elements with matching keys are not appended when using this operator. As the original array already has 8 elements, with keys 0 to 7, any elements in the additionalTreelistUpdateFields array with keys 0 to 7 are not added.

This can be tested by adding a field to the pages table that controls frontend access to the page and adding it to TYPO3_CONF_VARS['BE']['additionalTreelistUpdateFields'].

Actions #4

Updated by Gerrit Code Review almost 12 years ago

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

Actions #5

Updated by Gerrit Code Review about 11 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/11978

Actions #6

Updated by Gerrit Code Review about 11 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/11978

Actions #7

Updated by Gerrit Code Review about 11 years ago

Patch set 1 for branch TYPO3_6-1 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/25277

Actions #8

Updated by Gerrit Code Review about 11 years ago

Patch set 1 for branch TYPO3_6-0 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/25278

Actions #9

Updated by Gerrit Code Review about 11 years ago

Patch set 1 for branch TYPO3_4-5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/25279

Actions #10

Updated by Bart Dubelaar about 11 years ago

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

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF