Project

General

Profile

Actions

Bug #78591

closed

can't delete referenced files - column missing from database

Added by Dominik Hahn over 7 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2016-11-07
Due date:
% Done:

0%

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

Description

Hey guys,

whenever I try to delete a file that is in use I get this exception:
An exception occurred while executing 'SELECT `recuid`, `uid_foreign`, `tablenames`, `fieldname`, `sorting_foreign` FROM `sys_file_reference` WHERE `uid` = 590': Unknown column 'recuid' in 'field list'

The problem also occurs on files that used to be referenced, even after deleting the reference.
The deletion of files that are not referenced anywhere (fresh uploads) works.

I have checked the database and the database analyzer, the column isn't there and TYPO3 doesn't want to create it.

I had this problem before when we were using the dev-master of TYPO3 8 but updating to TYPO3 8.3.1 didn't resolve this.

Actions #1

Updated by Mathias Schreiber over 7 years ago

  • Status changed from New to Needs Feedback
  • Assignee set to Mathias Schreiber

Hi Dominik,

can you be a bit more precise about the scenario.
Here's what I tried (with current master, though):
  • File module:
    • Upload file
    • reload filelist
    • delete file -> works
  • Content Element
    • Upload file
    • reference file in CE
    • delete reference -> works
  • File module:
    • Upload file
    • Reference file in CE
    • Try to delete file -> triggers warning that file is in use in an CE
Actions #2

Updated by Dominik Hahn over 7 years ago

Hello there!

I should have checked TYPO3 8.4.0 first.

The query in question is built in /vendor/typo3/cms/typo3/sysext/core/Classes/Utility/File/ExtendedFileUtility.php (around line 579).
TYPO3 8.3.1 builds a select query and tries to select the non-existent column which causes the problems.
TYPO3 8.4.0 builds almost the same query but without the recuid column.

I'm sorry for the inconvenience caused :-/

Actions #3

Updated by Mathias Schreiber over 7 years ago

  • Status changed from Needs Feedback to Resolved

Ah, don't sweat it.
We can't expect everyone to update minors within a week.

As long as everything it working now, everything's fine.

Have a great week.
Mathias

Actions #4

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF