Bug #66243
closedFile links in RTE don't get counted as a reference since TYPO3 6.2.11
100%
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.
Updated by Markus Klein over 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
Updated by Gerrit Code Review over 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
Updated by Xavier Perseguers over 9 years ago
- Sprint Focus changed from Remote Sprint to Stabilization Sprint
Updated by Xavier Perseguers over 9 years ago
- Target version changed from next-patchlevel to 6.2.12
Updated by Markus Klein over 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
- 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.
Updated by Gerrit Code Review over 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
Updated by Nicole Cordes over 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.
Updated by Markus Klein over 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.
Updated by Gerrit Code Review over 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
Updated by Gerrit Code Review over 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
Updated by Nicole Cordes over 9 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 7c0304a2861bf272b3bd599400aeb5dbd95211ec.
Updated by Riccardo De Contardi about 7 years ago
- Status changed from Resolved to Closed