Issue Task Closed

#46686RTE linking to file doesn't prevent deleting it

Max Roesch 03/26/13, 14:26 updated 02/15/14, 18:48

Description

I have searched the bug tracker but couldn’t find a issue for this.

Take a clean installation (i.e. the current introduction package), take an image and create a link to it using the bodytext field of a normal text CE. The link uses a syntax like ie. file:832 which is the UID of the actuall sys_file.

1. Therefore no sys_file_reference is created, which makes it possible to delete the original file via filelist without any warning.

2. The file is deleted but the sys_file database record remains and doesn’t have the deleted flag set. This results in: Frontend & Backend still showing a valid link to a file (which doesn’t exists anymore). The typolink in the frontend is rendered with full name and path, but when you click it (to download it) you get a fatal error, because the actual file isn’t there anymore.

3. So i tried setting the missing deleted flag via database, which then results in fatal erros in the link wizard and frontend reporting they can’t find a file for the given UID (#1317178604: No file found for given UID.)

Is this issue known and maybe already fixed?

Is there any reason why the actual file is not referenced via a sys_file_reference?
The bodytext should then have a link like filereference:12 (UID of sys_file_reference which then leads to the original sys_file)

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.