Bug #91680
closedRecord with sub-items is doubled in workspace after moving
100%
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
Updated by Christian Kuhn over 4 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.
Updated by Gerrit Code Review over 4 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
Updated by Christian Kuhn over 4 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.
Updated by Gerrit Code Review over 4 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
Updated by Gerrit Code Review over 4 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
Updated by Gerrit Code Review over 4 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
Updated by Gerrit Code Review over 4 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
Updated by Gerrit Code Review over 4 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
Updated by Christian Kuhn over 4 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 84cbe10d85e7d05cf134582e1a07b4eab8c38659.
Updated by Gerrit Code Review over 4 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
Updated by Gerrit Code Review over 4 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
Updated by Christian Kuhn over 4 years ago
- Status changed from Under Review to Resolved
Applied in changeset d079793ba0e125fcac294c03105e983f31e49e11.