Bug #38063
closedContent elements disappear on publishing a page
0%
Description
With #30604 a severe Bug in 4.7 was introduced with these effects:
- content on a newly created page in a workspace will not be shown in the page module (but is inserted like it should twice in the db (INITIAL PLACEHOLDER and First draft version)
- after publishing the page and the content, both content elements are deleted from the db (not just marked deleted, but really deleted)
This is caused by the missing t3ver_swapmode in TCEmain: (code from 4.5)
$fieldArray['pid'] = -1; $fieldArray['t3ver_oid'] = $this->substNEWwithIDs[$id]; $fieldArray['t3ver_id'] = 1; $fieldArray['t3ver_state'] = -1; // Setting placeholder state value for version (so it can know it is currently a new version...) $fieldArray['t3ver_label'] = 'First draft version'; $fieldArray['t3ver_wsid'] = $this->BE_USER->workspace; if ($table === 'pages') { // Swap mode set to "branch" so we can build branches for pages. $fieldArray['t3ver_swapmode'] = $versioningType; } $phShadowId = $this->insertDB($table, $id, $fieldArray, TRUE, 0, TRUE);
TCA ref says, that t3ver_swapmode is exclusive to pages, so it would be ok to remove the field, if there were not over 30 occurances of t3ver_swapmode throughout the core.
With 0 in that field, the wrong page record / id is fetched in these cases, since i guess it behaves like newPagesVersioningType was set to 0 (page) which is "known for the drawbacks of loosing ids"
Quick fix: reintroduce 3 lines to always set t3ver_swapmode to -1 for the workspace pages
$fieldArray['t3ver_label'] = 'First draft version'; $fieldArray['t3ver_wsid'] = $this->BE_USER->workspace; if ($table === 'pages') { $fieldArray['t3ver_swapmode'] = -1; } $phShadowId = $this->insertDB($table, $id, $fieldArray, TRUE, 0, TRUE); //
Real fix: all checks/occurences of t3ver_swapmode must be adopted to behave like this was set to -1
Updated by Oliver Hader over 12 years ago
- Status changed from New to Accepted
- Assignee set to Oliver Hader
- Target version set to 4.7.2
Updated by Oliver Hader over 12 years ago
- Subject changed from Severe bug with new pages and content elements in workspace: not shown in page module, deleted after publishing to Content elements disappear on publishing a page
Updated by Gerrit Code Review over 12 years ago
- Status changed from Accepted to Under Review
Patch set 1 for branch version_4-7 has been pushed to the review server.
It is available at http://review.typo3.org/12532
Updated by Gerrit Code Review over 12 years ago
Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/12533
Updated by Gerrit Code Review over 12 years ago
Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/12533
Updated by Gerrit Code Review over 12 years ago
Patch set 2 for branch version_4-7 has been pushed to the review server.
It is available at http://review.typo3.org/12532
Updated by Gerrit Code Review over 12 years ago
Patch set 3 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/12533
Updated by Wouter Wolters over 11 years ago
- Status changed from Under Review to Resolved
Merged in 6.0 and 4.7
Updated by Michael Stucki almost 11 years ago
- Category changed from Bugs to Workspaces
Updated by Michael Stucki almost 11 years ago
- Project changed from 624 to TYPO3 Core
- Category changed from Workspaces to Workspaces
Updated by Riccardo De Contardi about 7 years ago
- Status changed from Resolved to Closed