Issue Bug Rejected

#104680BackendUtility::workspaceOL does not handle deleted pages

Christian Weiske 08/21/24, 11:30 updated 02/17/25, 20:04

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 with pages.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

  1. Gerrit Code Review pushed patch set 1 for main to change 88253 status New Under Review 02/17/25, 19:06

  2. Georg Ringer commented and changed status Under Review Rejected 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'] === 2 which means it is deleted!