#104680BackendUtility::workspaceOL does not handle deleted pages
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
pagesrecord 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.
Reviews 1
History 12
-
Gerrit Code Review pushed patch set 1 for main to change 88253 status
NewUnder Review 02/17/25, 19:06 -
Georg Ringer commented and changed status
Under ReviewRejected 02/17/25, 20:04
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'] === 2which means it is deleted!