Project

General

Profile

Actions

Bug #94964

closed

linkvalidator parser breaks [header_link]

Added by Marcus Förster over 3 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Linkvalidator
Target version:
-
Start date:
2021-08-23
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
10
PHP Version:
7.4
Tags:
Complexity:
easy
Is Regression:
Sprint Focus:

Description

https://www.gtai.de/GTAI/Navigation/EN/Invest/Industries/Mobility/automotive,t=industry--market-numbers,did=247736.html

wrong $url @ typo3/sysext/linkvalidator/Classes/LinkAnalyzer.php->checkLinks
    [substr] => Array
        (
            [type] => external
            [tokenID] => #
            [tokenValue] => https://www.gtai.de/GTAI/Navigation/EN/Invest/Industries/Mobility/automotive
        )

    [row] => Array
        (
            [uid] => #
            [pid] => #
            [header] => #
            [header_link] => "https://www.gtai.de/GTAI/Navigation/EN/Invest/Industries/Mobility/automotive,t=industry--market-numbers,did=247736.html" _blank - "Read more" 
        )

    [table] => tt_content
    [field] => header_link
    [uid] => #

converts to
    [scheme] => http
    [host] => did=247736.html
    [fragment] => 247736" 

Files

Actions #1

Updated by Sybille Peters about 3 years ago

  • Status changed from New to Needs Feedback

@Marcus

I am not sure what you mean by "converts to [scheme] => http ...". Where did you see that happen? How can I reproduce the problem?

I created a content element with header_link="https://www.gtai.de/GTAI/Navigation/EN/Invest/Industries/Mobility/automotive,t=industry--market-numbers,did=247736.html" and started the link check. The link is not reported as broken.

Also, the only place I know where the URL is parsted into scheme, host, fragment, is in ExternalLinktype::preprocessUrl() and this worked correctly.

(I tested with TYPO3 version master 11 development from git).

Actions #2

Updated by Marcus Förster about 3 years ago

just checked again at reference version 10.4 [.21] ; still "broken"

Actions #3

Updated by Sybille Peters about 3 years ago

  • Status changed from Needs Feedback to New
Actions #4

Updated by Nikita Hovratov about 3 years ago

Tested on TYPO3 v10.4.21 and PHP 7.4.24
It works fine. The PHP parse_url function splits it correctly:

Array
(
    [scheme] => https
    [host] => www.gtai.de
    [path] => /GTAI/Navigation/EN/Invest/Industries/Mobility/automotive,t=industry--market-numbers,did=247736.html
)

I tested it with various PHP 7.4 versions and all seemed to work right.

Actions #5

Updated by Sybille Peters about 3 years ago

  • Status changed from New to Needs Feedback

Thanks Nikita.

I am setting to "Needs Feedback" again. Maybe this was fixed. Without a reproducible test case it is difficult.

Actions #6

Updated by Marcus Förster about 3 years ago

maybee because it is in quotation &| mask-element?
"https://www.gtai.de/GTAI/Navigation/EN/Invest/Industries/Mobility/automotive,t=industry--market-numbers,did=247736.html" _blank - "Read more"

Actions #7

Updated by Sybille Peters about 3 years ago

@Marcus, can you please make sure, the problem is easily reproducible in some way, ideally that people can reproduce by reading the description above (which is currently not the case).

Please also see comment from Nikita, where he could not reproduce this.

What I personally prefer (and what is also propagated by others) is a "steps to reproduce", "expected result" and "actual result". You went a bit further to investigate and find an explanation. That is also great and helpful but to investigate we first need to be able to reproduce.

What might also help is checking if you can reproduce it on a latest coredev instance (created from git master), e.g. like this https://docs.typo3.org/m/typo3/guide-contributionworkflow/master/en-us/Appendix/SettingUpTypo3Ddev.html or - if only reproducible in 10, switching to the 10.4 branch first.

Sorry, I don't mean to be tedious you just have to keep in mind, people look in this issue and quickly go away if they can't reproduce it. The better the description, the more likely we give attention to this.

Actions #9

Updated by Riccardo De Contardi about 2 years ago

  • Status changed from Needs Feedback to Closed

No feedback since a lot of time => closing this issue.

If you think that this is the wrong decision or experience the issue again and have more information about how to reproduce your problem, please reopen it or open a new issue with a reference to this one.

Thank you and best regards

Actions

Also available in: Atom PDF