Bug #83377
closedSoft Reference Index is broken for files
0%
Description
The reference index build for files via the soft reference indexer is broken.
The reference index entry is created with type _FILE
and the ref_string
is filled up with the uid of the sys_file
record.
- Create a Text Media Content element
- Add a text and link it to a file
- Run
cleanup:missingfiels
vendor/bin/typo3 cleanup:missingfiles --update-refindex Find all file references from records pointing to a missing (non-existing) file. ================================================================================ ! [NOTE] Finding missing files referenced by TYPO3 requires a clean reference index (sys_refindex) ! [NOTE] Found 1 soft-referenced files that need manual repair. * 108 - f9165d6906bdd2e6a6ea39f3f05a6957 - tt_content:9:bodytext::typolink_tag ******************************************* Reference Index being Updated ******************************************* 3258 records from 102 tables were checked/updated. Index Integrity was perfect!
The reference index will always be broken as the indexer tries to resolve the file path (ref_string) which is the id. So the missingfiles task will always report an error as it tries to find file is_file(PATH_site . 108)
.
IMO the whole _FILE
stuff can be dropped from the reference index as there is only FAL from version 8. So all reference index stuff could be build based on database records. Removing all the _FILE
stuff will end up in normal databse relation checks which give the expected result as a file is internally also a database record (sys_file). Storing the file path and checking if that path is available does not really makes sense IMO if using a file abstraction layer.
Another option would be so create the refindex the same way as a native field does it.
If a link is created in a native link field (no soft ref index) the entry is created as type "_STRING" and the "ref_string" contains the "typolink".
hash tablename recuid field flexpointer softref_key softref_id sorting deleted workspace ref_table ref_uid ref_string 81fbe3b5f0f7195cbd7f27fea2c992c9 tt_content 9 header_link typolink 42d061dbe8503a03e71e5e002ed94c3a:0 -1 0 0 _STRING 0 t3://file?uid=108 f9165d6906bdd2e6a6ea39f3f05a6957 tt_content 9 bodytext typolink_tag 9 -1 0 0 _FILE 0 108
Files
Updated by taywa gmbh almost 7 years ago
- File no_ref_deletable.png no_ref_deletable.png added
- File reference_info_asset.png reference_info_asset.png added
- Priority changed from Should have to Must have
Users are trained that they can delete non referenced files, because they think they are unused. If they do, no warning is showing up resulting in silent remove of file links in a content. Thats not what we want.
If have got 1630 files!
! [NOTE] Found 1630 soft-referenced files that need manual repair. * 583 - 002018900567c643e1444c3c98b24889 - tt_content:1649:bodytext::typolink_tag
Updated by taywa gmbh almost 7 years ago
- Related to Bug #81831: sys_refindex and bodytext columns: link reference to files not working added
Updated by Benni Mack about 5 years ago
- Related to Bug #84016: impexp: page links are parsed / replaced incorrectely due to error in SoftReferenceIndex added
Updated by Benni Mack about 5 years ago
- Status changed from Accepted to Resolved
Fixed with issue #84016 - will be released in the next v9 / v10 versions.