Commit b3b4fd86 authored by Sybille Peters's avatar Sybille Peters 🙋 Committed by Christian Kuhn
Browse files

[BUGFIX] Better handling of "too many redirects" in linkvalidator

Previously, if there were too many redirects, an error message
"A redirect loop occurred" was displayed. This was misleading.

A redirect loop is different from "too many redirects". "Too
many redirects simply means that the maximum number of redirects
used by the underlying HTTP request library (Guzzle) is reached
before reaching the destination. This happens by default after
5 redirects.

Therefore, the "too many redirects" error is now being displayed
with its own message.

Resolves: #92741
Releases: master
Change-Id: I69e191e1f2c771eb83b8c82b2be12dd58730d8e3

Reviewed-by: Oliver Bartsch's avatarOliver Bartsch <>
Reviewed-by: default avatarGuido Schmechel <>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <>
Tested-by: default avatarTYPO3com <>
Tested-by: Christian Kuhn's avatarChristian Kuhn <>
parent 7e057100
......@@ -181,7 +181,7 @@ class ExternalLinktype extends AbstractLinktype
} catch (TooManyRedirectsException $e) {
// redirect loop or too many redirects
// todo: change errorType to 'redirect' (breaking change)
$this->errorParams['errorType'] = 'loop';
$this->errorParams['errorType'] = 'tooManyRedirects';
$this->errorParams['exception'] = $e->getMessage();
$this->errorParams['message'] = $this->getErrorMessage($this->errorParams);
} catch (ClientException $e) {
......@@ -235,6 +235,9 @@ class ExternalLinktype extends AbstractLinktype
case 'tooManyRedirects':
$message = $lang->getLL('');
case 'exception':
$message = sprintf($lang->getLL(''), $errorParams['exception']);
......@@ -153,6 +153,9 @@
<trans-unit id="" resname="">
<source>A redirect loop occurred. (%s: %s)</source>
<trans-unit id="" resname="">
<source>Too many redirects.</source>
<trans-unit id="" resname="">
<source>Accessing this address is not allowed (403).</source>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment