Project

General

Profile

Actions

Bug #92849

closed

Moving Records in Workspace with drag&drop creates no workspace placeholder record and that leads to multiple bugs

Added by Achim Fritz about 4 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Workspaces
Target version:
-
Start date:
2020-11-16
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
10
PHP Version:
7.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

all bugs only happens with drag&drop, not when moving records in clipboard

Starting Position

having 2 Content Elements (on page 139) in to different columns

mysql> select uid,pid,colPos,sorting,t3ver_wsid,t3ver_oid,t3ver_state,t3ver_move_id,header from tt_content;
+-----+-----+--------+---------+------------+-----------+-------------+---------------+--------+
| uid | pid | colPos | sorting | t3ver_wsid | t3ver_oid | t3ver_state | t3ver_move_id | header |
+-----+-----+--------+---------+------------+-----------+-------------+---------------+--------+
|   1 | 139 |      9 |     256 |          0 |         0 |           0 |             0 | test1  |
|   2 | 139 |     10 |     128 |          0 |         0 |           0 |             0 | test2  |
+-----+-----+--------+---------+------------+-----------+-------------+---------------+--------+

switch to WS

Test 1

move test1 before test2 (into colPos 10) with drag&drop and reload page: test1 is after test2

DB:

mysql> select uid,pid,colPos,sorting,t3ver_wsid,t3ver_oid,t3ver_state,t3ver_move_id,header from tt_content;
+-----+-----+--------+---------+------------+-----------+-------------+---------------+--------+
| uid | pid | colPos | sorting | t3ver_wsid | t3ver_oid | t3ver_state | t3ver_move_id | header |
+-----+-----+--------+---------+------------+-----------+-------------+---------------+--------+
|   1 | 139 |      9 |     256 |          0 |         0 |           0 |             0 | test1  |
|   2 | 139 |     10 |     128 |          0 |         0 |           0 |             0 | test2  |
|   3 | 139 |     10 |     256 |          1 |         1 |           0 |             0 | test1  |
+-----+-----+--------+---------+------------+-----------+-------------+---------------+--------+

SimpleDatahandlerController calls DataHandler with

$data = [
    'tt_content' => [
        'colPos' => 10,
        'sys_language_uid' => 0
    ]
];
$cmd = [
    'tt_content' => [
        1 => ['move' => 139]
    ]
];

Test 2

go back to starting position
move test2 after test1 (into colPos 9) with drag&drop and reload page: test1 is after test2

mysql> select uid,pid,colPos,sorting,t3ver_wsid,t3ver_oid,t3ver_state,t3ver_move_id,header from tt_content;
+-----+-----+--------+---------+------------+-----------+-------------+---------------+--------+
| uid | pid | colPos | sorting | t3ver_wsid | t3ver_oid | t3ver_state | t3ver_move_id | header |
+-----+-----+--------+---------+------------+-----------+-------------+---------------+--------+
|   1 | 139 |      9 |     256 |          0 |         0 |           0 |             0 | test1  |
|   2 | 139 |     10 |     128 |          0 |         0 |           0 |             0 | test2  |
|   3 | 139 |      9 |     128 |          1 |         2 |           0 |             0 | test2  |
+-----+-----+--------+---------+------------+-----------+-------------+---------------+--------+

Test 3

in both Tests the moved CE is rendered at the origin colPos in Frontend-Workspace-Review

Test 4

moving Elements with clipboard instead of drag&drop all Tests works fine
e.g. Test 1 leads to Datahandler call

$data = null;
$cmd = [
  'tt_content' => [
      1 => [
          'move' => [
              'action' => 'paste',
              'target' => 139,
              'update' => [
                  'colPos' => 10,
                  'sys_language_uid' => 0
              ]
          ]
      ]
  ]
];

and Databse
mysql> select uid,pid,colPos,sorting,t3ver_wsid,t3ver_oid,t3ver_state,t3ver_move_id,header from tt_content;
+-----+-----+--------+---------+------------+-----------+-------------+---------------+------------------------------------+
| uid | pid | colPos | sorting | t3ver_wsid | t3ver_oid | t3ver_state | t3ver_move_id | header                             |
+-----+-----+--------+---------+------------+-----------+-------------+---------------+------------------------------------+
|   1 | 139 |      9 |     256 |          0 |         0 |           0 |             0 | test1                              |
|   2 | 139 |     10 |     128 |          0 |         0 |           0 |             0 | test2                              |
|   3 | 139 |     10 |     256 |          1 |         1 |           4 |             0 | test1                              |
|   4 | 139 |     10 |      64 |          1 |         0 |           3 |             1 | [MOVE-TO PLACEHOLDER for #1, WS#1] |
+-----+-----+--------+---------+------------+-----------+-------------+---------------+------------------------------------+

Actions

Also available in: Atom PDF