Bug #81831
closedsys_refindex and bodytext columns: link reference to files not working
100%
Description
It seems that references in the Filelist for files referenced in any bodytext column are not working anymore in typo3 8.7.x. I even tried with the latest release 8.7.3.
I attached an image that you can see the PDF file-example.pdf has no Ref although the file is linked in a text element (in a bodytext field). It used to show the number of times it was referenced.
I tried in a clean installation and it also doesn't work, so I think this a bug. This was helpful to know if the file is being linked anywhere in the website.
Files
Updated by Marcelo Vetter over 7 years ago
- Subject changed from sys_refindex and bodytext columns: link reference to files when linking a file in a text element is not working to sys_refindex and bodytext columns: link reference to files not working
Updated by Wolfgang Klinger over 7 years ago
I can confirm that. It works with TYPO3 7.6, but not with current master anymore.
Updated by Franz Kugelmann about 7 years ago
- File sys_refindex.jpg sys_refindex.jpg added
I can confirm, too. The reason is that the code for creating the Link to the references in FileList::makeRef is checking only for entries in sys_refindex with ref_table='sys_file'. Since 8 however, for links in bodytext and i.e. header field to files from filelist there are new keywords "_FILE" and "_STRING" introduced. You can easily check this by truncating table sys_refindex and creating such file references in an textmedia content element.
I guess the code in FileList::makeRef needs to be adapted to take also "_FILE" and "_STRING" into account. Not sure about side effects or if such references would correctly be shown however.
Updated by Franz Kugelmann about 7 years ago
- Has duplicate Bug #82864: File links in rte_ckeditor don't get counted as a reference added
Updated by Tania Morales almost 7 years ago
Can you please confirm if there is an update on this issue ?
Updated by Gerrit Code Review almost 7 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55158
Updated by Gerrit Code Review almost 7 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55158
Updated by Gerrit Code Review almost 7 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55158
Updated by Gerrit Code Review almost 7 years ago
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55158
Updated by taywa gmbh almost 7 years ago
- Related to Bug #83377: Soft Reference Index is broken for files added
Updated by Leonie Philine almost 7 years ago
I can also confirm this bug.
The sys_refindex contains entries with ref_table="_FILE"
, ref_uid
ALWAYS = 0
and ref_string
being the sys_file uid
.
\TYPO3\CMS\Filelist\FileList::makeRef()
only counts entries with ref_table="sys_file"
and ref_uid
being the sys_file uid
- instead of ref_string
.
The CURRENTLY correct (but indeed broken) way (watch out - here we have duplicated code!) is implemented here: \TYPO3\CMS\Backend\Utility\BackendUtility::referenceCount()
. As a workaround, \TYPO3\CMS\Filelist\FileList::makeRef() could make use of this @BackendUtility
method.
(Still must be used with parameter $table='_FILE'
- then ref_string is used rather than ref_uid
for file (soft)reference count.)
Of course it would be more correct to use sys_file
database relations instead of the _FILE
hack with sys_file uids
being stored in ref_string
.
I hope that https://review.typo3.org/#/c/55158/ lands soon!
Updated by Gerrit Code Review almost 7 years ago
Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55431
Updated by Nicole Cordes almost 7 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset e6b9cdea8568ef803890f9b907f04b3f3b282712.
Updated by Franz Kugelmann about 5 years ago
- Related to Bug #86628: Linked files not referenced in backend filelist added