Calling delete() on a file-object throws exception
I'm calling delete() on a file-object in one of my extbase extensions. This results in:
There is no entry in the $TCA array for the table "sys_file_processedfile". This means that the function enableFields() is called with an invalid table name as argument.
I just searched the TCA and I can confirm that there is no entry for sys_file_processedfile.
You call following line in ProcessedFileRepository:
$whereClause = 'original=' . (int)$file->getUid() . $this->getWhereClauseForEnabledFields();
In my opinion the part with enableFields is wrong here.
Updated by Stefan Froemken about 7 years ago
I'm calling delete() in TYPO3_MODE===FE.
Please have a look into getWhereClauseForEnabledFields() of AbstractRepository. As you can see you have a context check there. If we are in FE-Mode you're calling sys_page->enableFields which needs a valid TCA-entry. And in BE-Mode you're calling BEenableFields which also does a check for a valid entry, but if nothing is found, it returns a simple empty string and doesn't break functionality.