Bug #37371

Task #44339: Workspace Compatibility

Drag'n Drop and Workspaces

Added by uwe trotzek 12 months ago. Updated 4 months ago.

Status:Resolved Start date:2012-05-21
Priority:Should have Due date:
Assignee:Sebastian Böttger % Done:

0%

Category:Versioning and workspaces Spent time: -
Target version:-
TYPO3 Version:4.5 PHP Version:
Votes: 2 (View)

Description

It is not possible to move elements (when you are in a draft workspace) via drag 'n drop.

History

Updated by Rocco Georgi 11 months ago

  • Assignee set to Rocco Georgi

Updated by Jo Hasenau 11 months ago

  • Category set to Versioning and workspaces

Updated by Jo Hasenau 9 months ago

  • Status changed from New to Accepted

Updated by Hans Höchtl 9 months ago

The problem is that if you use workspaces there are placeholder elements inserted into tt_content to which the new elements with pid = -1 refer to.

The t3lib_tcemain creates a placeholder containing the default values of the original tt_content table layout.
Because gridelements alters this table and adds columns, these additional columns are ignored by the placeholder generation.

This can easily be fixed by moving a single line in class.t3lib_tcemain.php:661 to 655.

Line 656 onward:

if ($createNewVersion) {
    $newVersion_placeholderFieldArray = $fieldArray;
}

// Processing of all fields in incomingFieldArray and setting them in $fieldArray
$fieldArray = $this->fillInFieldArray($table, $id, $fieldArray, $incomingFieldArray, $theRealPid, $status, $tscPID);

needs to be changed to:

// Processing of all fields in incomingFieldArray and setting them in $fieldArray
$fieldArray = $this->fillInFieldArray($table, $id, $fieldArray, $incomingFieldArray, $theRealPid, $status, $tscPID);

if ($createNewVersion) {
    $newVersion_placeholderFieldArray = $fieldArray;
}

If you switch these lines, than the placeholder will contain the same configuration values for the tx_* columns and every other extension column added to the tt_content table.

Updated by Maik Peuser 6 months ago

Any update on this ?

We ran across this problem on a project and can't find any real solution for the problem. The above fix modifies typo3 core so we can't use this way, as it may cause some sideeffects on other things. some versions below class.t3lib_tcemain.php:700 to 704 is a hook processDatamap_postProcessFieldArray which is already implemented in class.tx_gridelements_tcemainhook.php. is it maybe possible to use this function instead of modifying the core ?

Updated by Jo Hasenau 4 months ago

  • Assignee changed from Rocco Georgi to Sebastian Böttger
  • TYPO3 Version set to 4.5

Updated by Jo Hasenau 4 months ago

  • Parent task set to #44339

Updated by Jo Hasenau 4 months ago

  • Status changed from Accepted to Resolved

Also available in: Atom PDF