Bug #92849

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

Added by Achim Fritz 10 months ago. Updated 16 days 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] |
+-----+-----+--------+---------+------------+-----------+-------------+---------------+------------------------------------+

#1

Updated by Gerrit Code Review 4 months ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/69137

#2

Updated by Gerrit Code Review 4 months ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/69137

#3

Updated by Gerrit Code Review 4 months ago

Patch set 1 for branch 10.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/69126

#4

Updated by Benni Mack 4 months ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
#5

Updated by Benni Mack 16 days ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF