Project

General

Profile

Actions

Bug #81831

closed

sys_refindex and bodytext columns: link reference to files not working

Added by Marcelo Vetter almost 7 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
-
Target version:
Start date:
2017-07-11
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

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

sys_refindex.png (28.8 KB) sys_refindex.png Marcelo Vetter, 2017-07-11 00:13
bodytext.png (23.4 KB) bodytext.png Marcelo Vetter, 2017-07-11 00:13
sys_refindex.jpg (45.7 KB) sys_refindex.jpg Franz Kugelmann, 2017-09-25 17:54

Related issues 3 (0 open3 closed)

Related to TYPO3 Core - Bug #83377: Soft Reference Index is broken for filesClosed2017-12-18

Actions
Related to TYPO3 Core - Bug #86628: Linked files not referenced in backend filelistClosed2018-10-11

Actions
Has duplicate TYPO3 Core - Bug #82864: File links in rte_ckeditor don't get counted as a referenceClosed2017-10-26

Actions
Actions #1

Updated by Marcelo Vetter almost 7 years ago


Actions #2

Updated by Marcelo Vetter over 6 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
Actions #3

Updated by Wolfgang Klinger over 6 years ago

I can confirm that. It works with TYPO3 7.6, but not with current master anymore.

Actions #4

Updated by Franz Kugelmann over 6 years ago

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.

Actions #5

Updated by Franz Kugelmann over 6 years ago

  • Has duplicate Bug #82864: File links in rte_ckeditor don't get counted as a reference added
Actions #6

Updated by Tania Morales over 6 years ago

Can you please confirm if there is an update on this issue ?

Actions #7

Updated by Gerrit Code Review over 6 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

Actions #8

Updated by Gerrit Code Review over 6 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

Actions #9

Updated by Gerrit Code Review over 6 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

Actions #10

Updated by Gerrit Code Review over 6 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

Actions #11

Updated by taywa gmbh over 6 years ago

  • Related to Bug #83377: Soft Reference Index is broken for files added
Actions #12

Updated by Leonie Philine over 6 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!

Actions #13

Updated by Gerrit Code Review about 6 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

Actions #14

Updated by Nicole Cordes about 6 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #15

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions #16

Updated by Franz Kugelmann over 4 years ago

  • Related to Bug #86628: Linked files not referenced in backend filelist added
Actions

Also available in: Atom PDF