CoreCommunity ExtensionsDistributionsFeature-RequestsTYPO3 6.2 Projects (+)(Archived Projects)

Support #51988

How should I handle deleted files?

Added by Oliver Salzburg almost 2 years ago. Updated about 1 year ago.

Status:Closed Start date:2013-09-13
Priority:Should have Due date:
Assigned To:Fabien Udriot % Done:

0%

Category:-
Target version:-

Description

Several obsolete files were deleted from the fileadmin folder. Yet, they still appear in the Media module.

When I run the database check, it tells me:

Consider fixing the problem for uid(s): 228, 62, 229, 218, 220, 219, 224, 284, 248, 105, 106, 36, 75, 37, 38, 39, 40, 1, 82, 6, 7, 9, 10, 11, 12, 13, 16, 17, 42, 83.

So, how am I supposed to fix this problem? Running the FAL reindexing job has no effect on this issue.


Related issues

related to Core - Task #50876: Handling of deleted files in FAL New 2013-08-06

History

#1 Updated by Frans Saris almost 2 years ago

This is a core issue that still is pending https://review.typo3.org/#/c/23671/

#2 Updated by Fabien Udriot almost 2 years ago

@Frans are you still waiting for review regarding https://review.typo3.org/#/c/23671? Not strictly the same but wasn't a similar patch related to the recycler reverted at one point? For what reasons actually?

#3 Updated by Frans Saris almost 2 years ago

@Fabien, Yes still waiting for some reviews (mainly testing the patch). If you would fine some time that would be great!

During the FAL codesprint in Mainz we discussed the whole concept of deleting files and whether or not to use the deleted flag. The result of the discussion was #50876.

So in this concept the deleted flag is gone (#51562 already merged in all 6.* branches).
The patch that was reverted was based on the fact that the deleted flag was present. It needed to be reverted because setting the deleted flag caused a lot of problems in very different parts of the core.

For keeping the sys_file table in sync with the file system there are also some patches merged.
In current master there is now a new flag to mark a file as missing #50827 and a report for this is added #51097. This looks a lot like the functionality of the media indexer job #41555. Main difference is that this is handled by the fileindexed schedular task, there is a new report in the core reports module and a warning is shown on all placed in BE where such a file is used/referenced.

What still is missing is a way to clean up a database that's out of sync with the file system (remove all records marked as missing, all processed files and references). For this there will be a new db check submodule created.

#4 Updated by Fabien Udriot almost 2 years ago

Hi Frans

Thanks for your explanation. I have just reviewed https://review.typo3.org/#/c/23671.

So in this concept the deleted flag is gone (#51562 already merged in all 6.* branches).

Ok, I see. I found the deleted flag being a nice security net for clumsy Users but if an editor can only delete files that have no references, this can also be ok...

It means the "recycler" concept is also dropped consequently, I assume.

All related sys_file_reference recored get deleted (not flagged deleted but realy deleted)

How do you handle files referenced in the RTE? Did you mention that at some point? At the moment FAL is not aware whether a file is referenced at the RTE level.

Main difference is that this is handled by the fileindexed schedular task, there is a new report in the core reports module and a warning is shown on all placed in BE where such a file is used/referenced.

Good.

Just for your information - you didn't seem to know that - whenever you make a CLI command with Extbase (which was the case for #41555), the command is automatically available as task in the scheduler which is a neat feature.

What still is missing is a way to clean up a database that's out of sync with the file system (remove all records marked as missing, all processed files and references). For this there will be a new db check submodule created.

I see. Have you started something already? Something for the next Active Contributor sprint maybe. I will try to come also.

#5 Updated by Frans Saris almost 2 years ago

Fabien Udriot wrote:

Hi Frans

Thanks for your explanation. I have just reviewed https://review.typo3.org/#/c/23671.

So in this concept the deleted flag is gone (#51562 already merged in all 6.* branches).

Ok, I see. I found the deleted flag being a nice security net for clumsy Users but if an editor can only delete files that have no references, this can also be ok...

It means the "recycler" concept is also dropped consequently, I assume.

No the "recycler" is on the feature list for now. In the new concept it still makes sense to have the recycler. That can be a extra net for the clumsy Users :)

All related sys_file_reference recored get deleted (not flagged deleted but realy deleted)

How do you handle files referenced in the RTE? Did you mention that at some point? At the moment FAL is not aware whether a file is referenced at the RTE level.

I know Helmut looked in to that. Do not know current status.

Just for your information - you didn't seem to know that - whenever you make a CLI command with Extbase (which was the case for #41555), the command is automatically available as task in the scheduler which is a neat feature.

Ok, good to know. What is the benefit to still create a CLI command?

What still is missing is a way to clean up a database that's out of sync with the file system (remove all records marked as missing, all processed files and references). For this there will be a new db check submodule created.

I see. Have you started something already? Something for the next Active Contributor sprint maybe. I will try to come also.

No not yet. That's excatly what I hoop to tackle on the sprint in a few weeks. Hope to see you there.

#6 Updated by Fabien Udriot almost 2 years ago

Just for your information - you didn't seem to know that - whenever you make a CLI command with Extbase (which was the case for #41555), the command is automatically available as task in the scheduler which is a neat feature.

Ok, good to know. What is the benefit to still create a CLI command?

It's need to be double checked, but I don't know if you can add extra configuration of a regular CLI Command driven by Extbase. In our case, that make sense if we have a report sent by email to a configurable admin user.

#7 Updated by Lorenz Ulrich about 1 year ago

  • Status changed from New to Needs Feedback
  • Assigned To set to Fabien Udriot

Is there anything more to do here ATM? The "check index" command can delete missing entries now.

#8 Updated by Fabien Udriot about 1 year ago

  • Status changed from Needs Feedback to Closed

Also available in: Atom PDF