Copy/Cut & Paste and move record dn/up not working in workspace
|Status:||On Hold||Start date:||2012-02-21|
|Priority:||Won't have this time||Due date:|
|TYPO3 Version:||6.1||PHP Version:|
Using TYPO3 4.4.13 with Workspaces (own Workspace, no Draft-WS)
Problems with content elements inside a multicolumn:
- CEs cannot be moved up oder down, nothing happens when clicking on the arrows
- copy&paste of CEs works incorrectly, when copying and pasting, it pastes 2 copies of an element, always at the bottom! (with different IDs, looks like a "Live"-one and a "WS"-one. When deleting one of the duplicates, it deletes both of them)
- cut&paste CEs, does not work at all, nothing happens
- After some editing: suddenly it is not possible anymore to create new content elements. Instead of the content selection view, only the text "New content element" is visible in the right frame
Outside the multicolumn element, everything works normally.
Updated by Ina Heydecke about 1 year ago
- File multicolumn_workspace.png added
We have some similar problems with multicolumn and TYPO3 4.5
- Creating a multicolumn container inside an existing multicolumn container doesn't work as intended. You can not create a content element inside the second container! Only a blank page with the headline "New content element" is shown. This happens only with nested containers created in draft workspace. Inserting a content element in a nested container from live workspace is working perfectly.
- Moving a multicolumn container from page to page only affects the container itself. All versioned content inside the container remains on the first page (visible in list module). The connection between container and content however is preserved and correctly shown in page module.
- Changing the sort order of elements inside a container isn't possible. If i try to move an element to second position there are suddenly 2 elements visible (live and draft). Same with copy & paste.
Our customer needs multicolumn inside workspaces and i don't want to switch to another extension (also because there are not sooo many alternative solutions...) :(
Updated by Ina Heydecke about 1 year ago
- File multicolumn_workspace_database.png added
- Assignee set to Michael Birchler
Some hours of searching and debugging through multicolumn and t3 core gave me a hint on where the problem is located. Firstly in lib/class.tx_multicolumn_db.php in function getWorkspaceClause: if workspace is detected the where-clause gets modified... but with an unpleasent result. In Backend there is - at first glance - a correct output. But a second glance unveils, that the shown new workspace element is not the right one!
For each in draft created or modified element exist (min) two entries in tt_content alike the following
uid - pid - t3ver_id - t3ver_wsid - t3ver_label - t3ver_state - t3ver_stage - t3ver_count - t3_origuid - tx_multicolumn_parentid - t3ver_oid
60 - -1 - 1 - 1 - INITIAL PLACEHOLDER - 1 - 0 - 0 - 0 - 0 - 0
61 - -1 - 1 - 1 - First draft version - -1 - 0 - 0 - 0 - 15958 - 15960
There is a placeholder and one or more draft versions. The placeholder is used for the output in BE and will be overlayed with the newest draft version. But the content element id used in BE is always the one of the placeholder record.
Multicolumn does something different. Instead of using the TYPO3 internal workspace overlay methods it creates a custom where-clause which directly selects the DRAFT VERSION! So in BE there is no Element with ID 60 but 61 - and all basic BE functions expect the placeholder element. Thats why sorting or copy/paste of elements inside multicolumn doesn't work or produces some strange results.
So what happens, if the additional where-clause will be disabled? All in draft created elements inside a mc column aren't visible any more. But live elemets are. ô.O
The reason for this strange behaviour can be found in the database: the tx_multicolumn_parentid is missing in the workspace placeholder! But ONLY in the workspace elements. I attached a second image to make it clear.
If i insert the tx_multicolumn_parentid in placeholder element, it pops up in BE and all problems are gone.
Well... that's the point, where my comprehension of the codebase has its limits. Why there is 0 instead of the corrent id... is it something inside multicolumn code? Or a basic core based problem? Hope someone can help!
Updated by Dmitry Dulepov about 1 month ago
- Status changed from New to On Hold
- Assignee deleted (
- Priority changed from Must have to Won't have this time
- TYPO3 Version set to 6.1
tx_multicolumn_parentid is updated by the core as a part of remapping process during copying.
Putting this on hold: first we solve all the rest, than we come back to workspaces because these issues are the most complex.