Bug #37948
closed
additionalTreelistUpdateFields are not working
Added by Bart Dubelaar over 12 years ago.
Updated about 6 years ago.
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.
- Status changed from New to Under Review
can you give some more info:
- what was not correctly applied
- how can this be tested
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'].
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
- Status changed from Resolved to Closed
Also available in: Atom
PDF