Bug #72179
openChanging sorting of IRRE elements does not trigger cache clear cmd
0%
Description
Use case¶
Table "master", which has records of table "slave" inside IRRE.
TCA looks like:
'irrefield' => array( 'exclude' => 0, 'label' => 'some label', 'config' => array( 'type' => 'inline', 'minitems' => 0, 'maxitems' => 9999, 'foreign_table' => 'tx_ext_slave', 'foreign_field' => 'masterid', 'foreign_sortby' => 'sorting' ) ),
TCA of table "slave" has (as recommended in docs) no [CTRL][sorting] field set.
The records of table "master" are stored in a sysfolder and used to render output in a fully cached plugin.
The page of the plugin has a cache tag set. A clearCacheCmd is configured on the sysfolder via page TSconfig that would take care of flushing the cache for the tag in case records are changed.
Experienced behaviour¶
Changing the order of "slave" records in a record of "master" via IRRE does not trigger the clearCacheCmd configured via TSconfig.
The sorting is saved correctly to DB, though.
Expected behaviour¶
A clearCacheCmd must be executed if the children of the current record are changed as this might/will have impact on cached pages relying on those records.
Analysis¶
As it turns out, changing only the sorting of "slave" records does of course not make any changes to the "master" record.
Therefore no data change is detected by DataHandler and no cache clearing functionality is triggered.
Why does it work for CE assets?¶
Simply because there is another bug, that causes the "master" record (CE) always to have a change, so the cache is always cleared.
Those always happening field changes are "t3ver_state" and "categories".
Solution¶
Let the "data has changed" information bubble up to the "master" record, so that proper cache clearing can take place.