Skip to content

Commit

Permalink
[BUGFIX] Do not touch colPos if command was "localize"
Browse files Browse the repository at this point in the history
Prevent modification of colPos for "localize" action, record
needs to keep original colPos to be in sync with translation
parent/source.

Close: #1795
  • Loading branch information
NamelessCoder committed Jun 5, 2020
1 parent 7cb2c1c commit 12a962a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Classes/Integration/HookSubscribers/DataHandlerSubscriber.php
Expand Up @@ -61,6 +61,11 @@ public function processDatamap_afterDatabaseOperations($command, $table, $id, $f
$originalParentUid = ColumnNumberUtility::calculateParentUid($originalRecord['colPos']);
$newColumnPosition = 0;

if (!empty($fieldArray['l18n_parent'])) {
// Command was "localize", do not touch colPos.
return;
}

if (isset(static::$copiedRecords[$originalParentUid])) {
// The parent of the original version of the record that was copied, was also copied in the same request;
// this means the record that was copied, was copied as a recursion operation. Look up the most recent copy
Expand Down

0 comments on commit 12a962a

Please sign in to comment.