Bug #84016

impexp: page links are parsed / replaced incorrectely due to error in SoftReferenceIndex

Added by Markus Stauffiger over 4 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Link Handling, Site Handling & Routing
Target version:
-
Start date:
2018-02-22
Due date:
% Done:

100%

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

Description

With the new handling of the link field in the backend, the page links, e.g. in the header_link field of a content element, are not parsed correctly and therefore not replaced during the import.

TYPO3 7

TYPO3 8

I think the problem is within the SoftReferenceIndex, so the bug might actually be in core and not impexp.


Files

typo3_7.png (61.2 KB) typo3_7.png Markus Stauffiger, 2018-02-22 21:52
typo3_8.png (63.5 KB) typo3_8.png Markus Stauffiger, 2018-02-22 21:52
yuno_page.png (97.4 KB) yuno_page.png Markus Stauffiger, 2018-02-22 22:50
patch_gaya.diff (9.41 KB) patch_gaya.diff DANIEL Rémy, 2019-09-10 18:52

Related issues

Related to TYPO3 Core - Bug #85576: Linkvalidator not checking linked content elements with TypoLinkClosed2018-07-16

Actions
Related to TYPO3 Core - Bug #87652: SoftReferenceIndex :: TypoLink :: links like "t3:// FileLinks" won't be recognizedClosed2019-02-05

Actions
Related to TYPO3 Core - Bug #88207: SoftReferenceIndex is missing support for t3://file uriClosed2019-04-25

Actions
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
#1

Updated by Markus Stauffiger over 4 years ago

  • Subject changed from impexp: page links are parsed / replaced correctely to impexp: page links are parsed / replaced incorrectely
#2

Updated by Markus Stauffiger over 4 years ago

  • File yuno_page.png yuno_page.png added
  • Subject changed from impexp: page links are parsed / replaced incorrectely to impexp: page links are parsed / replaced incorrectely due to error in SoftReferenceIndex
  • Category changed from Import/Export (T3D) to Link Handling, Site Handling & Routing

The bug is within the SoftReferenceIndex.

Arriving at https://github.com/TYPO3/TYPO3.CMS/blob/master/typo3/sysext/core/Classes/Database/SoftReferenceIndex.php#L499 $containsSlash || $isLocalFile it decides that a t3://page link is a local file and therefore does not get to the part where it's marked as a page.

#3

Updated by Markus Klein over 4 years ago

Hi!

Thanks for reporting and analysis.

Can you push a patch with a solution?
(https://docs.typo3.org/typo3cms/ContributionWorkflowGuide/ if you need a first-time setup)

#4

Updated by DANIEL Rémy over 4 years ago

@Markus Klein, I've quickly patched the SoftReferenceIndex for a single usecase.

But it seems SoftReferenceIndex needs a huge rewrite because the new link handling (t3://) is not well handled by the SoftReferenceIndex.
For example, a link in tt_content.header_link (typolink) or in tt_content.bodytext (typoling_tag) will not be referenced the same way in the database.
Also, a link to a record (t3://record) is not referenced at all.

I think I'm not the guy who can handle this rewrite because it too difficult for my skills...

#5

Updated by DANIEL Rémy over 4 years ago

  • Complexity changed from medium to hard
#6

Updated by Gerrit Code Review about 4 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/57610

#7

Updated by Patrick Broens about 4 years ago

Also the core extension "linkvalidator" is suffering from this.

To reproduce:
  • Install the extension "linkvalidator"
  • Make a content element on a page with the field "header_link" filled with t3://page?uid=5000, where 5000 is a non existing page in your database
  • Go to the module "Web > Info > Linkvalidator" and check the links on the page
  • The page mentioned in this field will not show up in the report or in the "Internal links" counter.

You can do the same with t3://file?uid=5000

TypoLinks used in the RTE in an anchor tag are fine.

#8

Updated by Gerrit Code Review about 4 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/57610

#9

Updated by Patrick Broens about 4 years ago

  • Related to Bug #85576: Linkvalidator not checking linked content elements with TypoLink added
#10

Updated by Patrick Broens about 4 years ago

  • Related to Epic #85006: Reduce falsely reported broken links added
#11

Updated by Gerrit Code Review about 4 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/57610

#12

Updated by Gerrit Code Review almost 4 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/57610

#13

Updated by Gerrit Code Review almost 4 years ago

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

#14

Updated by Gerrit Code Review almost 4 years ago

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

#15

Updated by Gerrit Code Review almost 4 years ago

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

#16

Updated by Gerrit Code Review almost 4 years ago

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

#17

Updated by Gerrit Code Review over 3 years ago

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

#18

Updated by DANIEL Rémy almost 3 years ago

I've fixed this issue, and another one about handling of the anchor in links for a specific project.
I've attached the patch for the fix, it may be useful.

#19

Updated by Markus Klein almost 3 years ago

Daniel Hinderink Would you mind pushing your patch to the review system?

#20

Updated by DANIEL Rémy almost 3 years ago

There is already a patch in review: https://review.typo3.org/c/Packages/TYPO3.CMS/+/57610/

Should I amend the existing patch?

#21

Updated by Markus Klein almost 3 years ago

Sure, feel free

#22

Updated by Gerrit Code Review almost 3 years ago

Patch set 10 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/57610

#23

Updated by Gerrit Code Review almost 3 years ago

Patch set 11 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/57610

#24

Updated by Gerrit Code Review almost 3 years ago

Patch set 12 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/57610

#25

Updated by Gerrit Code Review almost 3 years ago

Patch set 13 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/57610

#26

Updated by Gerrit Code Review almost 3 years ago

Patch set 14 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/57610

#27

Updated by Gerrit Code Review almost 3 years ago

Patch set 15 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/57610

#28

Updated by Gerrit Code Review almost 3 years ago

Patch set 16 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/57610

#29

Updated by Gerrit Code Review almost 3 years ago

Patch set 17 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/57610

#30

Updated by Benni Mack almost 3 years ago

  • Related to Bug #87652: SoftReferenceIndex :: TypoLink :: links like "t3:// FileLinks" won't be recognized added
#31

Updated by Benni Mack almost 3 years ago

  • Related to Bug #88207: SoftReferenceIndex is missing support for t3://file uri added
#32

Updated by Gerrit Code Review almost 3 years ago

Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62143

#33

Updated by Gerrit Code Review almost 3 years ago

Patch set 2 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62143

#34

Updated by DANIEL Rémy almost 3 years ago

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

Updated by Benni Mack almost 3 years ago

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

Updated by Benni Mack almost 3 years ago

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

Updated by Sybille Peters almost 3 years ago

  • Related to deleted (Epic #85006: Reduce falsely reported broken links)
#38

Updated by Benni Mack over 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF