Project

General

Profile

Actions

Bug #67486

closed

[DATALOSE] Datahandler writes wrong workspace pid to live records

Added by Andreas Kiessling almost 9 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
DataHandler aka TCEmain
Target version:
-
Start date:
2015-06-16
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

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);
        }
    }
}

Related issues 1 (0 open1 closed)

Has duplicate TYPO3 Core - Bug #80663: Inline references are bound to versioned pageClosedOliver Hader2017-04-03

Actions
Actions #1

Updated by Alexander Opitz almost 9 years ago

  • Target version set to 6.2.14
Actions #2

Updated by Alexander Opitz almost 9 years ago

  • Target version changed from 6.2.14 to 6.2.15
Actions #3

Updated by Alexander Opitz over 8 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
Actions #4

Updated by Alexander Opitz over 8 years ago

  • Target version changed from 6.2.16 to 6.2.18
Actions #5

Updated by Riccardo De Contardi almost 8 years ago

  • Target version changed from 6.2.18 to Candidate for patchlevel
Actions #6

Updated by Andreas Kiessling over 7 years ago

Bug is still present in 7.6.14

Actions #7

Updated by Philipp Müller over 6 years ago

Bug is still present in 6.2.35 (ELTS), too.

Actions #8

Updated by Alexander Opitz over 6 years ago

  • Has duplicate Bug #80663: Inline references are bound to versioned page added
Actions #9

Updated by Alexander Opitz over 6 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.

Actions

Also available in: Atom PDF