#102674Make DatabaseQueryProcessor available as nested DatabaseProcessor in FilesProcessor
Description
I wanted to get the categories of files (used in a filecollection, CType uploads) and noticed that the fluid array had only categories as integer value with the number of categories used, not the particular selected categories.
I tried to add an additional nested DatabaseQueryProcessor but that didn’t work.
It seems like that nested DataProcessors are not allowed in a FilesProcessor, comparing with the MenuProcessor, for example.
It would be great if nested DataProcessors would also be available in a FilesProcessor and that the selected categories would be directly available in fluid when using the FilesProcessor or in this example, in the uploads content element but it should also work out-of-the-box on other content elements.
Not sure if that is a bugfix or new feature.
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
History 2
-
Georg Ringer changed Sprint Focus On Location Sprint <span data-processor="relativetime" data-value="2024-06-15T19:08:21+00:00" > 06/15/24, 19:08 </span>
-
Georg Ringer commented and changed status
NewRejected <span data-processor="relativetime" data-value="2025-03-14T07:42:33+00:00" > 03/14/25, 07:42 </span>
hey!
thanks for creating the issue. I checked it and this is currently not possible to solve because the filesprocessor gives back an array of filereferences which can’t be used in another dataprocessor as input.
I suggest creating either a custom filesprocessor which enhances the records or use a custom VH to get the data you need
the modifications I did was
$processedRecordVariables = []; foreach ($fileCollector->getFiles() as $key => $file) { $recordContentObjectRenderer = GeneralUtility::makeInstance(ContentObjectRenderer::class); $recordContentObjectRenderer->setRequest($cObj->getRequest()); $recordContentObjectRenderer->start($file->toArray(), 'sys_file_reference'); $processedRecordVariables[$key] = ['data' => $file->toArray()]; $processedRecordVariables[$key] = $this->contentDataProcessor->process($recordContentObjectRenderer, $processorConfiguration, $processedRecordVariables[$key]); } // set the files into a variable, default "files" $targetVariableName = $cObj->stdWrapValue('as', $processorConfiguration, 'files'); $processedData[$targetVariableName] = $processedRecordVariables;