Project

General

Profile

Actions

Bug #66336

closed

Refindex fixer should fix sys_file_reference problems

Added by Christian Weiske about 9 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
CLI
Target version:
-
Start date:
2015-04-09
Due date:
% Done:

0%

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

Description

The refindex fixer (./typo3/cli_dispatch.phpsh lowlevel_refindex -e) does only fix the table sys_refindex, but not sys_file_reference.

There is currently no way to fix broken file references. The refindex script should do that, too.


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Feature #45039: Scheduler task to clean up unused processed imagesClosed2013-01-31

Actions
Actions #1

Updated by Christian Weiske about 9 years ago

SQL query to delete sys_file_reference entries for which no sys_file row exists anymore:

DELETE sys_file_reference
FROM sys_file_reference
 LEFT JOIN sys_file
  ON sys_file_reference.uid_local = sys_file.uid
WHERE table_local = "sys_file" AND sys_file.uid IS NULL
Actions #2

Updated by Benni Mack over 5 years ago

  • Related to Feature #45039: Scheduler task to clean up unused processed images added
Actions #3

Updated by Susanne Moog about 4 years ago

  • Category set to CLI
Actions #4

Updated by Christian Kuhn over 1 year ago

  • Status changed from New to Closed

Hey.

I hope it's ok to close here for now: Scanning for db inconsistencies is a pretty broad topic and lowlevel is very outdated and clumsy in this regard - existing code needs to be streamlined or removed. ext:dbdoctor https://github.com/lolli42/dbdoctor tries to solve this systematically, and we will see how this evolves. For now, this is not a core solution, though.

Actions

Also available in: Atom PDF