#107579PHP 8 Warning: Undefined array key "NEWxxx" in cms-frontend/Classes/Hooks/TreelistCacheUpdateHooks.php line 81
Description
How to reproduce:
1. Have a v11 or v12 installation with PHP >= 8.0
2. Remove a column from the pages table, e.g. ALTER TABLE pages DROP COLUMN twitter_description;
3. Try to create a page in the backend
Result:
The creation of the page record fails due to the missing column. But the real reason is not shown, instead there is a cryptic
PHP Warning: Undefined array key "NEWxxx" in cms-frontend/Classes/Hooks/TreelistCacheUpdateHooks.php line 81
Reason:
TreelistCacheUpdateHooks.php line 81 tries to resolve the uid of the newly created page
$affectedPageUid = $dataHandler->substNEWwithIDs[$recordId];
This fails in PHP >= 8.0 as no page has been created due to the SQL error and thus $dataHandler->substNEWwithIDs does not contain an index for the $recordUid='NEWxxx'
The error does not happen in TYPO3 v13 as the class has been removed in #103165
This error has been reported in several other issues (#100828 #103237 #98959) which have all been closed without fixing the core issue.
How to circumvent:
Update the pages table in the database analyzer in the Install Tool in order to recreate the missing column(s).
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
Related issues 3
History 6
-
Stephan Großberndt changed Related to #100828 <span data-processor="relativetime" data-value="2025-10-01T13:52:00+00:00" > 10/01/25, 13:52 </span>
-
Stephan Großberndt changed Related to #103237 <span data-processor="relativetime" data-value="2025-10-01T13:52:09+00:00" > 10/01/25, 13:52 </span>
-
Stephan Großberndt changed Related to #98959 <span data-processor="relativetime" data-value="2025-10-01T13:52:16+00:00" > 10/01/25, 13:52 </span>
-
Stephan Großberndt changed description <span data-processor="relativetime" data-value="2025-10-01T13:54:56+00:00" > 10/01/25, 13:54 </span>
-
Garvin Hicking commented and changed category <span data-processor="relativetime" data-value="2025-10-01T15:23:23+00:00" > 10/01/25, 15:23 </span>
-
Georg Ringer commented and changed status
NewRejected <span data-processor="relativetime" data-value="2026-02-05T20:40:00+00:00" > 02/05/26, 20:40 </span>hey!
thanks for creating the issue! this leads to a chicken <> egg issue. if we can’t trust the table and the columns, we would need everywhere a check on header of tt_content, title of pages and so on.
therefore closing issue.
Hm I’m afraid this might be more a problem of enforcing a “proper” DB schema and detecting stale cache? Unsure this will get addressed for v12 though when there have been architectural changes meanwhile…