Project

General

Profile

Actions

Bug #89523

open

Epic #90129: [Extbase] Issues regarding hidden or deleted records

Hidden records are not found when explicitly enabled

Added by Michal Majernik over 4 years ago. Updated over 4 years ago.

Status:
Accepted
Priority:
Should have
Assignee:
-
Category:
Extbase
Target version:
-
Start date:
2019-10-28
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
10
PHP Version:
Tags:
hidden,setIgnoreEnableFields
Complexity:
medium
Is Regression:
No
Sprint Focus:

Description

When ignoreEnableFields is set to true and an action with the hidden record in arguments is called, then an exception is thrown:

Object of type Vendor\Example\Domain\Model\Record with identity "xxx" not found.

To reproduce:

Create a simple controller and an action

public function editAction(Record $record)
{
       //Do staff
}

Create a simple RecordRepository with following initializeObject function

public function initializeObject()
{
       $querySettings = GeneralUtility::makeInstance(Typo3QuerySettings::class);
       $querySettings->setIgnoreEnableFields(true);
       $querySettings->setRespectStoragePage(false);
       $this->setDefaultQuerySettings($querySettings);
}

Redirect to the editAction with a hidden Record


Related issues 1 (1 open0 closed)

Related to TYPO3 Core - Bug #84955: Extbase persistence layer ignores query settingsNeeds Feedback2018-05-09

Actions
Actions #1

Updated by Alexander Schnitzler over 4 years ago

  • Status changed from New to Accepted
  • Complexity set to medium
  • Is Regression set to No

I can confirm the described behavior.

The issue is caused by the PersistentObjectConverter which directly asks the PersistenceManager for an entity which then does not respect any settings of the repository.

Question is, if this is a bug or desired behavior.
Personally I would say that Extbase is not made to restrict the user but to give him the freedom he lacks when sticking to typoscript or other core functions, therefore I'd say that the user should have access to hidden and deleted resources and has to act accordingly himself.
Means: The property mapper should simply map the property and the user must decide whether to display the entity in the frontend.

Actions #2

Updated by Alexander Schnitzler over 4 years ago

  • Parent task set to #90129
Actions #3

Updated by Christian Kuhn almost 3 years ago

  • Related to Bug #84955: Extbase persistence layer ignores query settings added
Actions

Also available in: Atom PDF