#103237Page Tree Filter does not find newly created versioned records
Description
No description.
Reviews 2
Related issues 4
- Bug #98959Undefined array key "NEW_1" when adding (drag n drop) a new page
- Bug #100828Undefined array key error when inserting a page after copying
- Task #103165Remove treelist cache completely from core
- Bug #107579PHP 8 Warning: Undefined array key "NEWxxx" in cms-frontend/Classes/Hooks/TreelistCacheUpdateHooks.php line 81
History 1517
-
Gerrit Code Review pushed patch set 1 for main to change 83167 status
NewUnder Review <span data-processor="relativetime" data-value="2024-03-01T07:38:14+00:00" > 03/01/24, 07:38 </span> -
Benni Mack commented <span data-processor="relativetime" data-value="2024-03-04T09:56:24+00:00" > 03/04/24, 09:56 </span>
Lina Wolf wrote in #note-2:
> We seem to have the same issue without using workspaces. In one of our projects with TYPO3 v12.4.11 we get an error in the page tree filter whenever we try to add a new page using the data handler:
>
> PHP Warning: Undefined array key “NEW65e584cf06bad935695744” in /home/www/xxx/vendor/typo3/cms-frontend/Classes/Hooks/TreelistCacheUpdateHooks.php line 81
>Hey Lina,
these are two different issues, right? I cannot reproduce your issue.
-
Spawoz Technologies Pvt Ltd. commented <span data-processor="relativetime" data-value="2024-04-09T09:54:30+00:00" > 04/09/24, 09:54 </span>
Hi Ben,
I can also confirm the issue of Lina reported. When I tried to copy a page and paste, this issue happened. I tried with TYPO3 v12.4.13. Note: I was trying to upgrade a system from 10.4 to 12.4.
Thank you,
Arun -
Michael Blunck changed attached datahandler_fail.png attached datahandler.png <span data-processor="relativetime" data-value="2024-04-15T09:24:16+00:00" > 04/15/24, 09:24 </span>
-
Tim Spiekerkötter commented <span data-processor="relativetime" data-value="2024-04-22T08:38:11+00:00" > 04/22/24, 08:38 </span>
Hi Michael,
this helped immensely! Thanks!
Information for others encountering this issue:
We had the pages extended with a select field. Our problem was, that the field had NOT defined a “default” and the database was set to INT NOT NULL. But even tho the documentation states that “Default value set if a new record is created. If empty, the first element in the items array is selected.” this does not seem to be the case for a “foreign_table” select.
Without setting the “default” to 0 inside the TCA the DataHandler gets the following SQL error: “Incorrect integer value: ‘’ for column `mydatabase`.`pages`.`myfield` at row 1” in the insertDB method. This however does not get logged. Instead we only get “PHP Warning: Undefined array key “NEW662621357cbff613450439” in /app/vendor/typo3/cms-frontend/Classes/Hooks/TreelistCacheUpdateHooks.php line 81” in the log.
After setting the default to 0 everything works fine.
Cheers,
Tim -
Benni Mack changed target version <span data-processor="relativetime" data-value="2024-05-02T19:34:32+00:00" > 05/02/24, 19:34 </span>
-
Gerrit Code Review pushed patch set 1 for 12.4 to change 84292 <span data-processor="relativetime" data-value="2024-05-14T11:55:14+00:00" > 05/14/24, 11:55 </span>
-
Benni Mack commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2024-05-14T12:00:09+00:00" > 05/14/24, 12:00 </span>Applied in changeset commit:d818bb5357f13b4b1cbfb75d92a02726f5580f21.
-
Benni Mack changed status
ResolvedClosed <span data-processor="relativetime" data-value="2024-07-04T13:16:24+00:00" > 07/04/24, 13:16 </span> -
Michael Blunck changed
datahandler_fail.png<span data-processor="relativetime" data-value="2025-04-29T15:39:35+00:00" > 04/29/25, 15:39 </span> -
Michael Blunck changed
datahandler.png<span data-processor="relativetime" data-value="2025-04-29T15:39:39+00:00" > 04/29/25, 15:39 </span> -
Stephan Großberndt commented <span data-processor="relativetime" data-value="2025-10-01T12:47:04+00:00" > 10/01/25, 12:47 </span>
This issue pointed me in the right direction for having the same PHP error
Undefined array key in frontend/Classes/Hooks/TreelistCacheUpdateHooks.php line 81when trying to add a subpage to an existing page in the backend of a 12.4.37 installation.
The pages table was not up to date in the database analyzer, there were two missing columns. After adding them the subpage could be created. -
Stephan Großberndt changed Related to #98959 <span data-processor="relativetime" data-value="2025-10-01T12:48:30+00:00" > 10/01/25, 12:48 </span>
-
Stephan Großberndt changed Related to #100828 <span data-processor="relativetime" data-value="2025-10-01T12:53:04+00:00" > 10/01/25, 12:53 </span>
-
Stephan Großberndt changed Related to #103165 <span data-processor="relativetime" data-value="2025-10-01T13:24:28+00:00" > 10/01/25, 13:24 </span>
-
Stephan Großberndt changed Related to #107579 <span data-processor="relativetime" data-value="2025-10-01T13:52:09+00:00" > 10/01/25, 13:52 </span>
We seem to have the same issue without using workspaces. In one of our projects with TYPO3 v12.4.11 we get an error in the page tree filter whenever we try to add a new page using the data handler:
PHP Warning: Undefined array key “NEW65e584cf06bad935695744” in /home/www/xxx/vendor/typo3/cms-frontend/Classes/Hooks/TreelistCacheUpdateHooks.php line 81
More information regarding this error might be available online.
Following patch would solve it:
```
Index: Classes/Hooks/TreelistCacheUpdateHooks.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===============================================================
diff —git a/Classes/Hooks/TreelistCacheUpdateHooks.php b/Classes/Hooks/TreelistCacheUpdateHooks.php
—- a/Classes/Hooks/TreelistCacheUpdateHooks.php
+++ b/Classes/Hooks/TreelistCacheUpdateHooks.php (date 1709543377998)
@@ -78,7 +78,7
if ($status = 'new') {
// Detect new pages
// Resolve the uid
- $affectedPageUid = $dataHandler->substNEWwithIDs[$recordId];
+ $affectedPageUid = $dataHandler->substNEWwithIDs[$recordId] ?? 0;
$affectedPagePid = $updatedFields['pid'];
} elseif ($status = ‘update’) {
// Detect updated pages
```