Project

General

Profile

Actions

Bug #84955

open

Epic #86307: Extbase allows to fetch deleted/hidden records (respects ignoreEnableFields)

Extbase persistence layer ignores query settings

Added by Feeela no-lastname-given almost 6 years ago. Updated almost 3 years ago.

Status:
Needs Feedback
Priority:
Must have
Assignee:
-
Category:
Extbase
Target version:
-
Start date:
2018-05-09
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
8
PHP Version:
7.0
Tags:
extbase,persistence,enableFields
Complexity:
easy
Is Regression:
Sprint Focus:

Description

Description:

\TYPO3\CMS\Extbase\Persistence\Generic\Backend::getObjectByIdentifier() ignores any settings made to the defaultQuerySettings made for any repository. Since some repository methods internally use getObjectByIdentifier(), this method also must respect the default query settings. Currently there is no way of retrieving a hidden or deleted entity using Extbase. (Besides overwriting the core classes…)

Expected behavior:

When I disable the test for "enableFields", this setting should be used in any methods, that pull data from the persistence layer.

For example in a repository inside a initializeObject() method:

    /** @var $defaultQuerySettings QuerySettingsInterface */
    $defaultQuerySettings = $this->objectManager->get(QuerySettingsInterface::class);
    $defaultQuerySettings->setIgnoreEnableFields(true);

Actual behavior:

Hidden and deleted entities are excluded by default without any possibility to include them e.g. in controller actions (where the entities are being resolved before the action is executed).


Related issues 3 (1 open2 closed)

Related to TYPO3 Core - Bug #68672: setIgnoreEnableFields() should be inherited to language overlaysClosed2015-07-31

Actions
Related to TYPO3 Core - Bug #73007: Insufficient sysLanguageStatement does not respect enableFields for translationsClosed2016-01-29

Actions
Related to TYPO3 Core - Bug #89523: Hidden records are not found when explicitly enabledAccepted2019-10-28

Actions
Actions #1

Updated by Stephan Großberndt almost 6 years ago

  • Subject changed from Extbase peristence layer ignores query settings to Extbase persistence layer ignores query settings
Actions #2

Updated by Tymoteusz Motylewski over 5 years ago

  • Related to Bug #68672: setIgnoreEnableFields() should be inherited to language overlays added
Actions #3

Updated by Tymoteusz Motylewski over 5 years ago

  • Related to Bug #73007: Insufficient sysLanguageStatement does not respect enableFields for translations added
Actions #4

Updated by Tymoteusz Motylewski over 5 years ago

  • Parent task set to #86307
Actions #5

Updated by Alexander Schnitzler over 4 years ago

  • Status changed from New to Needs Feedback

I am currently looking at the code base of TYPO3 9.5 and the only method that uses getObjectByIdentifier is findByIdentifier, which deliberately does so.
Can you explain what exact method you call on the repository that causes this bug?

Actions #6

Updated by Christian Kuhn almost 3 years ago

  • Related to Bug #89523: Hidden records are not found when explicitly enabled added
Actions #7

Updated by Oliver Pfaff almost 3 years ago

Hi Folks,

I experience this bug also in TYPO3 10. I use the category repository from Extbase and get all categories from a specific parent. As a result I get a mix of default and second language entries. The categories are correctly localized in the system.

$this->categoryRepo->findByParent($this->settings['ids']['mainCat']);
Actions

Also available in: Atom PDF