Project

General

Profile

Actions

Bug #66243

closed

File links in RTE don't get counted as a reference since TYPO3 6.2.11

Added by Tobias Schaefer almost 9 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Must have
Assignee:
Category:
DataHandler aka TCEmain
Target version:
Start date:
2015-04-02
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
Yes
Sprint Focus:
Stabilization Sprint

Description

After the update from TYPO3 6.2.10 to 6.2.11 the file links set in the RTE don't get counted as a reference correctly anymore.
Steps to reproduce:
1) Insert a link to a file in a text element (RTE)
2) Check the number of references for this file in the filelist-module
3) The number should get increased, but it doesn't
After going back to 6.2.10 the number of references gets updated correctly again.


Related issues 3 (0 open3 closed)

Related to TYPO3 Core - Bug #66252: File links in RTE are considered as external links since TYPO3 6.2.11, causing exceptionClosed2015-04-02

Actions
Related to TYPO3 Core - Bug #66085: file link could not be modified anymoreClosed2015-03-27

Actions
Related to TYPO3 Core - Bug #60226: Content Element header_link to a page also adds a references to the file with same idClosedNicole Cordes2014-07-10

Actions
Actions #1

Updated by Markus Klein almost 9 years ago

  • Category set to DataHandler aka TCEmain
  • Status changed from New to Accepted
  • Priority changed from Should have to Must have
  • Target version set to next-patchlevel
  • Is Regression changed from No to Yes
  • Sprint Focus set to Remote Sprint
Actions #2

Updated by Nicole Cordes almost 9 years ago

  • Assignee set to Nicole Cordes
Actions #3

Updated by Gerrit Code Review almost 9 years ago

  • Status changed from Accepted 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 http://review.typo3.org/38598

Actions #4

Updated by Xavier Perseguers almost 9 years ago

  • Sprint Focus changed from Remote Sprint to Stabilization Sprint
Actions #5

Updated by Xavier Perseguers almost 9 years ago

  • Target version changed from next-patchlevel to 6.2.12
Actions #6

Updated by Markus Klein almost 9 years ago

Analysis

The reported bug here will be solved by reverting the first hunk in
https://review.typo3.org/#/c/37086/2/typo3/sysext/core/Classes/Database/ReferenceIndex.php

After reverting this code, the situation in the ReferenceIndex code is that there is code that parses fields
  • if a link wizard is attached
  • if a softref parser is defined

For the header_link field currently both options apply, which causes the field to be parsed twice.
There are some other (old) fields in the compatibility6 sysext, which have the same TCA setting as header_link, but pass an additional option to the typolink-softref-parser, named linkList (that is support for multiple links in a single field).

The wizard link FAL handling was introduced with https://review.typo3.org/#/c/10655/2/t3lib/class.t3lib_refindex.php (2012-04-20)
The softref FAL handling was introduced with https://review.typo3.org/#/c/10942/7/typo3/sysext/core/Classes/Database/SoftReferenceIndex.php (2013-03-22)

So the second change actually caused this duplicate indexing, as the softref-definition of the header_link fields is there since the initial commit!

Possible solutions

A possible solution would be to drop the softref-configuration on the header_link field, but that keeps the problem for the old fields, which need special treatment (linkList) through the softref-parser. So this is not a clean solution.

Another option would be to add a condition to the first code part and only run the parser if a link wizard is present but no softref-parser. (This will probably work, but is not nice code-wise as we couple two different classes via their configuration.)

Dropping the parsing for link wizards completely would be the best solution, leaving the magic to the softref-parser, since those fields are actually soft-refs and no real db-refs.
IMHO the original patch introducing this is just plain wrong about that code.

Actions #7

Updated by Gerrit Code Review almost 9 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/38598

Actions #8

Updated by Nicole Cordes almost 9 years ago

IMHO removing the parsing for link wizard would be a bad idea. This means that every extension using the link wizard without specifying the field to have soft references wouldn't have any file association anymore. I would still opt to add references for db type if no softref is defined in field configuration.

Actions #9

Updated by Markus Klein almost 9 years ago

Another possibility would be to drop the code and add a check that simply adds the softref setting for fields which obviously forgot to specify it.

Actions #10

Updated by Gerrit Code Review almost 9 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/38598

Actions #11

Updated by Gerrit Code Review almost 9 years ago

Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/38657

Actions #12

Updated by Nicole Cordes almost 9 years ago

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

Updated by Riccardo De Contardi over 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF