Issue Bug Resolved

#111262DataHandler skips the whole cache flush when one queued record is invalid

Benni Mack 10/28/26, 09:24 updated 11/03/26, 11:00

Description

At the end of the outermost process_datamap() / process_cmdmap() run, DataHandler::processClearCacheQueue() goes through all records that were registered for page cache clearing. If one queued entry has a uid <= 0 or belongs to a table without TCA, the method returns instead of skipping that entry.

As a result:

  • the page caches of all other records of the same DataHandler run are not flushed, so editors keep seeing outdated content in the frontend
  • the static queue ($recordsToClearCacheFor and $recordPidsForDeletedRecords) is not reset, so the invalid entry stays in the queue and also stops the cache flush of every later DataHandler run in the same PHP process (CLI commands, scheduler tasks, long-running workers)

Such entries reach the queue through the public DataHandler::registerRecordIdForPageCacheClearing(), for example from hooks or extensions passing a table without TCA, or an unresolved “NEW…” id that is cast to 0.

Steps to reproduce

1. Create a page cache entry tagged “pageId_2“
2. Call $dataHandler->registerRecordIdForPageCacheClearing(‘tx_table_without_tca’, 1)
3. Update a tt_content record on page 2 through the same DataHandler instance (start() + process_datamap())

Expected result

The page cache entry of page 2 is flushed. The invalid entry is skipped.

Actual result

Nothing is flushed. A second DataHandler run in the same process that edits another record on page 2 does not flush the cache either.

Reviews 4

History 27

  1. Benni Mack commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2026-10-28T09:55:15+00:00" > 10/28/26, 09:55 </span>

    Applied in changeset commit:51dea914ac72da223ca2f0d2b3879ace3edec477.

  2. Gerrit Code Review pushed patch set 1 for 13.4 to change 97314 status Resolved Under Review <span data-processor="relativetime" data-value="2026-11-03T10:46:48+00:00" > 11/03/26, 10:46 </span>

  3. Benni Mack commented and changed status Under Review Resolved <span data-processor="relativetime" data-value="2026-11-03T11:00:18+00:00" > 11/03/26, 11:00 </span>

    Applied in changeset commit:6dd3cf95cd78a4de30ac782c228920cef99291a7.