Bug #47384
closedError when deleting a record and the page its on
100%
Description
When someone deletes a record on a page in workspace (e.g. a content element on a page) and then deletes the page itself, then during a mass action "publish" an error message is shown: "Error: You cannot swap versions for a record you do not have access to edit!". The page and all records on it (including the one explicitly deleted) are deleted despite the message.
Steps to reproduce:¶
- As an editor go into workspace
- Delete a content element on a page
- Delete the page itself (you may need to delete the page twice until the delete marker is shown, but there is another bug for this already)
- Go into workspace module and start a mass action "publish"
Expected behavior:¶
The page and all records on it are deleted without error message
Actual behavior:¶
The page and all records on it are deleted but an error message is shown
Some more background about what happens:¶
- The mass action handler collects all records in workspace in TCA order (which puts pages first)
- The collected records are then processed in the order they have been collected
- The page gets deleted. When deleting a page, all records on the page are deleted, too.
- The content element is tried to get deleted. But it has already been deleted as all records on the page have been deleted. Therefore it cannot be deleted again.
- Keep track of all records that are deleted during workspace publish and remove them from the session variable "workspaceMassAction" and tceMain->cmd_map. This would need some kind of hook in t3lib_tcemain::deleteRecord which currently doesn't exist.
- Somehow resolve dependencies when collecting the records to process. This could ensure that records are deleted before pages are deleted. We would probably have to make sure that pages are created before records are created, so just ordering the tables is not sufficient. Problem here is that the information retrieved when collecting the workspace records is not sufficient to determine whether a record is deleted or not.
Both solutions seem to be way too complex for simply suppressing a false error message, but I don't see a simple solution.
Do you have any suggestion how I should proceed with this?
Updated by Oliver Hader over 11 years ago
- Status changed from New to Accepted
Possibility would be either
a) to fetch only records for the accordant mass action that can be published (thus "not deleted")
b) catch during action publishing process in DataHandler/DataHandlerHook, whether record does exist and thus can be published at all
"a" does not seem to work, if the page got removed as a result of the publishing process.
Updated by Gerrit Code Review over 11 years ago
- Status changed from Accepted to Under Review
Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/23129
Updated by Gerrit Code Review about 11 years ago
Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/23129
Updated by Gerrit Code Review about 11 years ago
Patch set 3 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/23129
Updated by Gerrit Code Review about 11 years ago
Patch set 4 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/23129
Updated by Gerrit Code Review about 11 years ago
Patch set 5 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/23129
Updated by Gerrit Code Review about 11 years ago
Patch set 6 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/23129
Updated by Michael Stucki almost 11 years ago
- Project changed from 624 to TYPO3 Core
- Category changed from Workspaces to Workspaces
Updated by Gerrit Code Review over 10 years ago
Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/23129
Updated by Gerrit Code Review almost 10 years ago
Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/23129
Updated by Oliver Hader about 9 years ago
- Target version changed from 7.5 to 7 LTS
- Complexity set to medium
- Is Regression set to No
Updated by Gerrit Code Review about 9 years ago
Patch set 9 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/23129
Updated by Gerrit Code Review over 8 years ago
Patch set 10 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/23129
Updated by Gerrit Code Review almost 8 years ago
Patch set 11 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/23129
Updated by Gerrit Code Review almost 8 years ago
Patch set 12 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/23129
Updated by Gerrit Code Review almost 8 years ago
Patch set 13 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/23129
Updated by Gerrit Code Review almost 8 years ago
Patch set 1 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50877
Updated by Oliver Hader almost 8 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 2cbe770599cf27a8a623d2e4768d4b9f9971d113.
Updated by Riccardo De Contardi about 7 years ago
- Status changed from Resolved to Closed