Project

General

Profile

Actions

Bug #91680

closed

Record with sub-items is doubled in workspace after moving

Added by This Mächler almost 4 years ago. Updated over 3 years ago.

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

100%

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

Description

Record with sub-items is doubled in workspace after moving. I discarded the whole workspace (working around https://forge.typo3.org/issues/91679), but the double is there anyway.

Can't be reverted, the workspace module says there are no changes (but in live workspace, the double is not there!)

Again: please fix those f***ing workspaces, or throw this whole "feature" away or code a new one!
It's not working for over 10 years now, and is still not working (partly, yes, but not really).

See nice screenshot of the frontend & backend. I did never copy anything!

One of the records is labeled as "OLD LOCATION (Move Placeholder)". I have NO chance to get rid of it! (except manipulating directly the database).

I imagine a redactor dealing with this, OMG! There is NO possibility to REALLY DISCARD THE WHOLE F***ING WORKSPACE, and just continue with what you have on live!

(And by the way: is it so hard to implement an automatic REFRESH OF THE TREE AFTER A MASS ACTION IN THE WORKSPACE MODULE?)


Files

Actions #1

Updated by Christian Kuhn over 3 years ago

Thanks for your report. It would be great if you could manage your tone a bit, though.

Reproduce with styleguide in master:

  • Have ext:styleguide loaded (it's a dev dependency for core, so it should be there already if doing core development)
  • Have a workspace on pid 0
  • Create a page in live workspace
  • Add a styleguide "Form engine - inline 1:n foreign field" record on this page, add an inline record named "1 inline el 1" to it
  • Add a second styleguide "Form engine - inline 1:n foreign field" record on this page, add an inline record named "2 inline el 1" to it
  • -> Ends up with 4 records: 2 "Form engine - inline 1:n foreign field" and two children "Form engine - inline 1:n foreign field child"
  • Switch to workspace, select page, list module
  • Resort the "Form engine - inline 1:n foreign field" (first down, or second up)
  • -> One of the children will be duplicated, this also persists if the changes are published

Confirmed in current master, not tested in v10 (reporter says it happens there), NOT confirmed in v9. I'd thus suspect the pid=-1 change to be a likely candidate for this regression.

Actions #2

Updated by Gerrit Code Review over 3 years 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/+/65230

Actions #3

Updated by Christian Kuhn over 3 years ago

As far as I found out, the children duplication happens only on children that are NOT workspace aware, if the parent is workspace aware.

In my test case, the parent table 'tx_styleguide_inline_1n' is workspace aware in TCA, while the child 'tx_styleguide_inline_1n_child' is not.

If both tables are workspace aware, I'm unable to reproduce a 'duplicate children are created' scenario. The workspace related irre functional tests show this scenario is ok, too.

Thus, I narrowed that down for the styleguide scenario now:
  • In v9, the core also tries to duplicate the child record, but that fails with styleguide since the record is tried to be inserted on pid=-1, but the children pid db field is unsigned. This actually triggers an error by the DataHandler, which is also shown as red box.
  • In v10 & master, the core no longer uses pid=-1 for versioned records, so the insert does not fail and the record is basically duplicated (because there are no workspace related fields).

I pushed a patch to fix this, by suppressing child table processing in workspace context if the child in not workspace aware.
We'll have to see if we'll want to cover that with tests - the core tests work with inline_tutorial tables and those are all workspace aware ... I'm currently not sure on how to cover this without adding further tables to the tests scenarios. I'll discuss that with others and the patch is marked WIP for now for that reason.

Actions #4

Updated by Gerrit Code Review over 3 years 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/+/65230

Actions #5

Updated by Gerrit Code Review over 3 years ago

Patch set 3 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/+/65230

Actions #6

Updated by Gerrit Code Review over 3 years ago

Patch set 4 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/+/65230

Actions #7

Updated by Gerrit Code Review over 3 years ago

Patch set 5 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/+/65230

Actions #8

Updated by Gerrit Code Review over 3 years 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/+/65252

Actions #9

Updated by Christian Kuhn over 3 years ago

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

Updated by Gerrit Code Review over 3 years ago

  • Status changed from Resolved to Under Review

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

Actions #11

Updated by Gerrit Code Review over 3 years ago

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

Actions #12

Updated by Christian Kuhn over 3 years ago

  • Status changed from Under Review to Resolved
Actions #13

Updated by Benni Mack over 3 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF