Bug #66336
closed
Refindex fixer should fix sys_file_reference problems
Added by Christian Weiske over 9 years ago.
Updated over 1 year ago.
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.
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
- Related to Feature #45039: Scheduler task to clean up unused processed images added
- 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.
Also available in: Atom
PDF