Project

General

Profile

Actions

Bug #97712

closed

PHP Warning: Undefined array key "t3ver_oid" in DataHandler.php line 7445

Added by B. Kausch almost 2 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
DataHandler aka TCEmain
Target version:
-
Start date:
2022-05-31
Due date:
% Done:

100%

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

Description

I have a translatable record which is not workspace enabled. When I try to localize an existing record into another language, this warning is thrown as an exception:

PHP Warning: Undefined array key "t3ver_oid" in DataHandler.php line 7445

See: https://github.com/TYPO3/typo3/blob/11.5/typo3/sysext/core/Classes/DataHandling/DataHandler.php#L7445

Actions #1

Updated by Chris Müller almost 2 years ago

I cannot reproduce it on TYPO3 v11.5.10 and PHP 8.1 (with installed workspaces extension and without). This is strange as the log call is surrounded by a condition which checks if a new version is available (which should be not the case if workspaces are disabled for the table).

Can you upload your TCA configuration and a full stack trace of the error?

Actions #2

Updated by B. Kausch almost 2 years ago

Chris Müller wrote in #note-1:

I cannot reproduce it on TYPO3 v11.5.10 and PHP 8.1 (with installed workspaces extension and without). This is strange as the log call is surrounded by a condition which checks if a new version is available (which should be not the case if workspaces are disabled for the table).

Can you upload your TCA configuration and a full stack trace of the error?

I think you misunderstood. I meant a table which is translatable but has no workspace columns! It has nothing to do with the workspace extension. The log method will be called when I try to translate a record... but the missing workspace columns (which are not mandatory) will lead to this warning.

Actions #3

Updated by B. Kausch almost 2 years ago

  • Target version deleted (next-patchlevel)

I have now tried to reproduce it with a minimal viable case. But didnt't get the error again. I have migrated a pretty old dataset from v7 to v11. Maybe something were off in my configs/data and is now fixed... Please close the issue.

Actions #4

Updated by Nicole Cordes almost 2 years ago

This problem still exists and can be triggered with EXT:styleguide

Given:
- list view of page "inline usecombinationbox"
- copy record "Form engine - inline use combination box" (in my case with Unique ID 1) to clipboard
- paste the record on any page

Expected:
- the record gets copied - either on the same or a different page

Actual:
- the warning "PHP Warning: Undefined array key "t3ver_oid" in DataHandler.php line 7445" is triggered

Code flow:

Copy triggers coping of related irre records with
\TYPO3\CMS\Core\DataHandling\DataHandler::copyRecord_raw -> \TYPO3\CMS\Core\DataHandling\DataHandler::insertNewCopyVersion ignoring that the table doesn't support workspaces at all.

Actions #5

Updated by Gerrit Code Review almost 2 years ago

  • Status changed from New to Under Review

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/75166

Actions #6

Updated by Gerrit Code Review almost 2 years ago

Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/75166

Actions #7

Updated by Gerrit Code Review almost 2 years ago

Patch set 1 for branch 11.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/75139

Actions #8

Updated by Nicole Cordes almost 2 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #9

Updated by Benni Mack over 1 year ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF