Project

General

Profile

Actions

Bug #100828

closed

Undefined array key error when inserting a page after copying

Added by Philipp Lüdtke over 1 year ago. Updated 6 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2023-05-08
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
11
PHP Version:
8.1
Tags:
Complexity:
Is Regression:
Sprint Focus:
Stabilization Sprint

Description

PHP Warning: Undefined array key "NEW6458a56ad522d182381312" in /var/www/xxxx.xxxx.xxx-xxx.xx/typo3_src-11.5.26/typo3/sysext/frontend/Classes/Hooks/TreelistCacheUpdateHooks.php line 81


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #98959: Undefined array key "NEW_1" when adding (drag n drop) a new pageClosed2022-10-31

Actions
Actions #1

Updated by Philipp Lüdtke over 1 year ago

The $dataHandler->substNEWwithIDs array is empty and i don't know why. No previous errors get logged.

Actions #2

Updated by Benni Mack over 1 year ago

  • Sprint Focus set to Stabilization Sprint
Actions #3

Updated by Frank Nägler over 1 year ago

  • Description updated (diff)
  • Status changed from New to Needs Feedback

Can you please provide some more information about how to reproduce the issue?

Actions #4

Updated by Philipp Lüdtke over 1 year ago

Tbh i have no idea how to reproduce it besides that it happened on inserting a page after copying (sometimes).

But i found this issue: https://forge.typo3.org/issues/98959

I think that might be just the same problem.

Actions #5

Updated by Marcin Sągol about 1 year ago

Philipp, did this problem occur on a site where you had modified the pages TCA, or was it a clean core configuration?

I have tested it on my local env, using T3-dev and couldn't reporoduce the issue when copy/pasting pages.

Looking at the code, there are 3 places where this temporary ID to real ID could fail:
- DataHandler::insertDB() where we call $id = $this->postProcessDatabaseInsert($connection, $table, $suggestedUid); but here we always has some int value
- DataHandler::insertDB() wher we check if (!$dontSetNewIdIndex) { $this->substNEWwithIDs[$NEW_id] = $id; ... } ; but looking at the code, this condition is never met, maybe if you overwrite core functions or call this the DataHandler::insertDB() from custom code with this parameter set to true
- some wrong mapping of the temporary ID used deeper in T3 and in higher code parts, but i as i said, i cpuldn't reproduce it.

Actions #6

Updated by Georg Ringer 6 months ago

  • Related to Bug #98959: Undefined array key "NEW_1" when adding (drag n drop) a new page added
Actions #7

Updated by Georg Ringer 6 months ago

  • Status changed from Needs Feedback to Closed

can't be reproduced and the mentioned solution in http://forge.typo3.org/issues/98959#note-3 might solve it here as well.

if the issue is still valid for you, feel free to open a new issue and reference this one. thanks!

Actions

Also available in: Atom PDF