Project

General

Profile

Actions

Bug #95053

open

findByUid not respecting default query settings of repository

Added by Eric Harrer over 2 years ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Extbase
Target version:
-
Start date:
2021-08-31
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
10
PHP Version:
7.4
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

In my repository I use:

public function initializeObject()
{
    $querySettings = new Typo3QuerySettings();
    $querySettings->setRespectStoragePage(false);
    $querySettings->setRespectSysLanguage(false);
    $querySettings->setIgnoreEnableFields(true);
    $this->setDefaultQuerySettings($querySettings);
}

Although setIgnoreEnableFields was set to true in the default query settings I am not able to find hidden elements with findByUid in my controller.

As a workaround, I've overridden findByUid in the repository as follows:

public function findByUid($uid)
{
    $query = $this->createQuery();
    return $query->matching($query->equals('uid', $uid))->execute()->getFirst();
}

This seems to be related to:
https://forge.typo3.org/projects/typo3cms-core/repository/1749/revisions/84c4ff2f2ec1ce98a9b170a6869b57cb4bb32a0c

I am not sure if this is a bug. Possibly this is just a missing piece in the documentation.

No data to display

Actions

Also available in: Atom PDF