Bug #37948
closedadditionalTreelistUpdateFields are not working
100%
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.
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
Updated by Georg Ringer over 12 years ago
can you give some more info:
- what was not correctly applied
- how can this be tested
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'].
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
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
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
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
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
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
Updated by Bart Dubelaar about 11 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 6755f40ab9ae8c5255645e9518c440b2ab9c8628.