Bug #104680
closedBackendUtility::workspaceOL does not handle deleted pages
0%
Description
A page record deleted in a workspace is still available when overlaying it with BackendUtility::workspaceOL()
.
Example¶
- Page #1 exists in live workspace
- Page #1 gets deleted in test workspace, creating a
pages
record withpages.t3ver_state = 2
(VersionState::DELETE_PLACEHOLDER
)
My custom backend code fetches a list of page UIDs and runs BackendUtility::workspaceOL()
on them. The record of deleted page #1 does not get set to false
as it is done when doing the same in the frontend with $GLOBALS['TSFE']->sys_page->versionOL
.
How am I supposed to know that the page has been deleted when BackendUtility::workspaceOL()
does not do that?
This problem should apply to v12 and v13 as well. I could not find any changelog entries.
Updated by Gerrit Code Review 4 months ago
- Status changed from New to Under Review
Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/88253
Updated by Georg Ringer 4 months ago
- Status changed from Under Review to Rejected
hey!
thanks for creating the issue! I checked the code and that code is not one of the nicest APIs we have. after doing a testrun at https://review.typo3.org/c/Packages/TYPO3.CMS/+/88253 I got dozens of tests failing which is a good indicator that changing stuff there will lead to a ton of other issues.
Therefore I reject the issue and we can't really do anything now or in the nearest future.
However, to solve it: you can and should check $row['t3ver_state'] === 2
which means it is deleted!