Project

General

Profile

Actions

Bug #61344

closed

findByRelation() does not work since 6.2.4

Added by Armin Vieweg over 9 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
File Abstraction Layer (FAL)
Target version:
-
Start date:
2014-09-04
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

Hello,

several users of the DCE extension mentioned, that the output of FAL images in backend does not work anymore, since they've updated to TYPO3 6.2.4. In previous version it worked.

I don't know why, but somehow the following call will not return any results anymore:

$fileRepository = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Resource\\FileRepository');
return $fileRepository->findByRelation('tt_content', $field, $contentObject['uid']);
Of course the entries are existing. A manual get of the relation entries works:
$contentObjectUid = intval($contentObject['uid']);
/** @var t3lib_DB $typo3Database */
$typo3Database = Tx_Dce_Utility_DatabaseUtility::getDatabaseConnection();
$rows = $typo3Database->exec_SELECTgetRows(
    'uid',
    'sys_file_reference',
    'tablenames = "tt_content" AND uid_foreign = ' . $contentObjectUid . ' AND fieldname = "' . $field . '"'
);
And with findFileReferenceByUid() I'll get the reference objects.

I'm using now this manual way of getting the references in my FalViewHelper.


Related issues 1 (1 open0 closed)

Related to TYPO3 Core - Bug #99442: FileRepository::findByRelation() works differently in FE or other contexts and will not return the file reference objects in CLI contextNew2023-01-01

Actions
Actions

Also available in: Atom PDF