Bug #22412
closedcache_treelist is out of date
0%
Description
I just noticed the following weirdness and I think I already had this 1-2 times:
cache_treelist contains an entry for one pid and its subpages, which is out of date, as it doesn't contain one subpage, which is visible, thus has to be included.
Maybe the cache is not correctly updated when changing <i>hidden</i> state of pages. User did the following:
1 Insert
2 Hide page: No
3Editing
4 Hide page: Yes
5 Editing
6 Hide page: No
The cache_treelist entry has the timestamp (and state before step 6).
So when changing <i>hidden</i> state, cache_treelist of the complete rootline must be outdated.
I hope I find the time to check this, soon.
(issue imported from #M14052)
Files
Updated by Steffen Gebert over 14 years ago
I'm NOT using the caching framework...
Updated by Christian Kuhn over 14 years ago
cache_treelist is not implemented in the caching framework, so this doesn't make a difference. There is a second bug with cache_treelist, I related it.
Updated by Steffen Gebert over 14 years ago
Thanks for enlightenement, Christian!
The problem lies in the following code in <i>tx_cmstreelistCacheUpdate::determineClearCacheActions</i>:
switch ($updatedFieldName) { case 'pid': // page moved $actions['allParents'] = true; $actions['uidInTreelist'] = true; break; case $GLOBALS['TCA']['pages']['ctrl']['enablecolumns']['disabled']: case $GLOBALS['TCA']['pages']['ctrl']['enablecolumns']['fe_group']: case $GLOBALS['TCA']['pages']['ctrl']['delete']: case 'extendToSubpages': case 'php_tree_stop': // page hidden / unhidden / deleted / extendToSubpages set // php_tree_stop and/or FE groups set $actions['uidInTreelist'] = true; break; ...
uidInTreeList can only work, when the currently processed uid IS in the tree list of the cache entry. But when unhiding a page, it is NOT inside, so we can't find the corresponding record and delete it. Instead we have to set action to allParents to remove all the cache entries for parent pages.
Patch will come soon, I'm a bit undecided on the other options, yet. Maybe some are affected by the same bug?!?
fe_group: Page was access restricted (> not in the cache?) and restriction is removed (> we can't find the cache entry?)
extendToSubpages: apply access restrictions also to subpages.. have to think about this
php_tree_stop: what's that?