Issue Bug Closed

#97220Extbase is not fully workspace aware in backend context

Torben Hansen 03/21/22, 18:55 updated 10/31/23, 10:27

Description

When data is fetched from an extbase repository in backend context, it is not respected that the query should also respect the current workspace the backend user is working on.

Prerequisites:

  • Extbase repository (ignore storage page) and a domain model

How to reproduce:

  • Create a new record for the domain model
  • Use the repository in FE context and use findAll()
  • One record will be returned -> this is correct
  • Switch to a workspace
  • Create another record for the domain model
  • Use the repository in FE context and use findAll()
  • Two record will be returned -> this is correct
  • Switch to live workspace
  • Use the repository in FE context and use findAll()
  • Two record will be returned -> this is not correct since the hew record created in the workspace is not published

The function getBackendConstraintStatement should add constraints for t3ver_state and t3ver_wsid constraints (see https://github.com/TYPO3/typo3/blob/main/typo3/sysext/extbase/Classes/Persistence/Generic/Storage/Typo3DbQueryParser.php#L738) depending on the workspace the user is working in.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.