Feature #97689
openResolve file relation on JsonView configuration
0%
Description
I recently created a headless project. For the project i used the news extension as well. With the help of the PSR-14, i got the news entries on my listener class. I wanted to convert the object to array because headless does not support extbase object, only json. I managed to convert everything to array with the following configuration:
$this->view->setConfiguration([
'news' => [
'_descendAll' => [
'_recursive' => ['categories', 'falMedia', 'contentElements', 'tags']
],
]
]);
Everything worked fine until i saw the falMedia object. It resolved the sys_file_reference, meaning it found the file, but it didnt retrieve the object, instead it returned the UID of the file. This is what i got:
falMedia": {
"0000000018019f7e000000007283656b": {
"alternative": "",
"description": "",
"fileUid": 8,
"link": "",
"pid": 37,
"showinpreview": 0,
"title": "",
"uid": 93
}
},
The UID is the sys_file_reference id and the fileUid is the file id in the sys_file table.
AFAIK there is not a function implemented that does just that (i looked inside the JsonView class) so it would be great if that can be possible in the future
Files
No data to display