Bug #13432
closedFeature #13680: Refactor external link, do not follow senseless loop, add user agent
404 for external links with no redirect
100%
Description
We get a 404 error when checking www.google.ch. First we thought it might be the bug #12225. But as far as we can see, google.ch is not redirecting anywhere. Could it be, that google is blocking the linkvalidator? Maybe something to do with user-agent string?
Updated by Philipp Gampe over 13 years ago
Maybe something to do with user-agent string?
Possibly, but could be a TYPO3 Bug too.
Do you use curl? (enable_curl use in Install Tool?).
linkvalidator relies on the TYPO3 method t3lib_div::getURL which sometimes seems to return wrong HTTP status codes.
Updated by internezzo ag over 13 years ago
cURL was off. Just enabled it to test. With cURL on, www.google.ch is no longer reported as broken. But we guess this should work with cURL off too?!
Updated by Philipp Gampe over 13 years ago
Then this is a bug in TYPO3 core ... http://bugs.typo3.org/view.php?id=16925
Please make sure all your URLs contain an ending slash "/". So instead of google.ch
write google.ch/
Updated by internezzo ag over 13 years ago
URL's with ending slash work, but you can't force customers to enter URL's like that ;)
Thanks for your work Philipp!
Updated by Dmitry Dulepov over 13 years ago
URLs with slash and without slash are technically different URLs. This, for example, is essential on sites made with Lotus Notes. Add slash and you will get a 404. So adding a slash automatically is a wrong solution.
Proper solution would be to check if there is a path in the URL or not. If there is no path ("http://google.ch"), you can append it. However you must not append a slash if the path is given.
Updated by Philipp Gampe over 13 years ago
- Status changed from New to Under Review
- Assignee set to Philipp Gampe
Thanks for your comment Dmitry. You are right that the "/" needs to be prepended before the path (the HTTP GET) if it is not there already.
But I think this should be handelt by API as linkvalidator only checks the links the user entered.
If this does not get fixed in core we need to do this ourself then and correct the link.
Second problem with this report is, that linkvalidator does not handle HTTP 400 Bad request. It should, so I will open a ticket for it.
Updated by Philipp Gampe over 13 years ago
- Status changed from Under Review to On Hold
Updated by Philipp Gampe over 13 years ago
- Status changed from On Hold to Under Review
I think this is fixed in core now. You check if this is still an issue with current dev of TYPO3 version?
Updated by Mr. Hudson over 13 years ago
Patch set 1 of change I49a7bd993e51da0cdd42b15f0bf77150bed4d556 has been pushed to the review server.
It is available at http://review.typo3.org/1705
Updated by Philipp Gampe over 13 years ago
The patch for 4.5 has not been commited yet. Maybe someone can review and push that at gerrit? (see link above)
Updated by Mr. Hudson over 13 years ago
Patch set 1 of change I0d998123a601d35cc983b13f577161f30bcd302f has been pushed to the review server.
It is available at http://review.typo3.org/2283
Updated by Mr. Hudson over 13 years ago
Patch set 2 of change I49a7bd993e51da0cdd42b15f0bf77150bed4d556 has been pushed to the review server.
It is available at http://review.typo3.org/1705
Updated by Philipp Gampe over 13 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Updated by Chris topher over 12 years ago
- Status changed from Resolved to Closed