Skip to content

Commit

Permalink
[BUGFIX] Prevent DataHandler warning for non-workspace tables
Browse files Browse the repository at this point in the history
If a record with associated inline records gets copied, the DataHandler
always handles the record creation as new versions. This raises some
warning when the corresponding table doesn't support workspaces. This
patch prevents warnings when a corresponding irre-table cannot create
any new version of a record.

Resolves: #97712
Releases: main, 11.5
Change-Id: Iadcdf693f82d021eca5af1350855803ba433c37b
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/75166
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: core-ci <typo3@b13.com>
Tested-by: Nikita Hovratov <nikita.h@live.de>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Nikita Hovratov <nikita.h@live.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
  • Loading branch information
IchHabRecht authored and lolli42 committed Jul 14, 2022
1 parent 6817177 commit 2edf8b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion typo3/sysext/core/Classes/DataHandling/DataHandler.php
Expand Up @@ -3853,7 +3853,7 @@ public function insertNewCopyVersion($table, $fieldArray, $realPid)
$fieldArray[$GLOBALS['TCA'][$table]['ctrl']['tstamp']] = $GLOBALS['EXEC_TIME'];
}
// Finally, insert record:
$this->insertDB($table, $id, $fieldArray, true);
$this->insertDB($table, $id, $fieldArray, BackendUtility::isTableWorkspaceEnabled($table));
// Resets dontProcessTransformations to the previous state.
$this->dontProcessTransformations = $backupDontProcessTransformations;
// Return new id:
Expand Down

0 comments on commit 2edf8b8

Please sign in to comment.