Bug #67486
closed[DATALOSE] Datahandler writes wrong workspace pid to live records
0%
Description
How to reproduce: add a file to the pages media -> The pid points to the live id. Now switch to a workspace and add another file. Since the big IRRE refactoring #56376, all relations should point to the live ids. The new sys_file_reference record does that, but the already existing record now has the uid of the pages record in the workspace! Both relations show up in the workspace and publishing the pages record also works, but the real trouble starts when cleaning up with "lowlevel_cleaner versions". The pages record from the workspace will be deleted because it is published. The records on that versioned page will also be deleted, and thus the sys_file_reference is gone.
How to fix? \TYPO3\CMS\Core\DataHandling\DataHandler::remapListedDBRecords_procInline does an SQL update which writes to the records it processed. Removing these lines prevents the wrong pid, but i have no idea what the intention of these were. But that won't fix the records with invalid pids...
// Update child records if change to pid is required (only if the current record is not on a workspace): if ($thePidToUpdate) { $updateValues = array('pid' => $thePidToUpdate); foreach ($originalItemArray as $v) { if ($v['id'] && $v['table'] && is_null(BackendUtility::getLiveVersionIdOfRecord($v['table'], $v['id']))) { $GLOBALS['TYPO3_DB']->exec_UPDATEquery($v['table'], 'uid=' . (int)$v['id'], $updateValues); } } }
Updated by Alexander Opitz over 9 years ago
- Target version changed from 6.2.14 to 6.2.15
Updated by Alexander Opitz about 9 years ago
- Subject changed from Datahandler writes wrong workspace pid to live records to [DATALOSE] Datahandler writes wrong workspace pid to live records
- Target version changed from 6.2.15 to 6.2.16
Updated by Alexander Opitz almost 9 years ago
- Target version changed from 6.2.16 to 6.2.18
Updated by Riccardo De Contardi over 8 years ago
- Target version changed from 6.2.18 to Candidate for patchlevel
Updated by Philipp Müller about 7 years ago
Bug is still present in 6.2.35 (ELTS), too.
Updated by Alexander Opitz almost 7 years ago
- Has duplicate Bug #80663: Inline references are bound to versioned page added
Updated by Alexander Opitz almost 7 years ago
- Status changed from New to Closed
- Assignee deleted (
Alexander Opitz) - Target version deleted (
Candidate for patchlevel)
This issue was fixed by #80663 so closing this issue as duplicate.