Project

General

Profile

Actions

Bug #103833

closed

Redirect /some-path/ points to itself! Aborting.

Added by Daniel Diele 6 months ago. Updated 6 months ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Link Handling & Redirect Handling
Target version:
-
Start date:
2024-05-14
Due date:
% Done:

0%

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

Description

We currently have the situation in a project in that we use Sentry for error tracking. Since the upgrade to v12.4 our Sentry is overflowing with errors of the following type:

Redirect /some-path/ points to itself! Aborting.

This error is thrown in vendor/typo3/cms-redirects/Classes/Http/Middleware/RedirectHandler.php TYPO3\CMS\Redirects\Http\Middleware\RedirectHandler::process at line 83.

The redirects pointing to themselves are caused when pages/slugs are renamed by editors and later reset to their original values e.g.:
/path-A is renamed to /path-B .
Later changing /path-B back to original value /path-A causes unwanted redirect with source_path == target.

It is also interesting to note that no redirection takes place on the client side. If you use the network tool to check whether a redirect has taken place when calling up an affected page, this is not the case.

Actions #1

Updated by Stefan Bürk 6 months ago · Edited

  • Status changed from New to Closed
  • Assignee set to Stefan Bürk

That log entry is a safe-guard, telling you that there is a
redirect which would lead to a redirect loop, because it is
pointing to the same page.

There is also a cli integrity check to get a overview:

$ vendor/bin/typo3 redirects:checkintegrity
+------------------+------------------------------+------------------------------------------------------+
| Source Domain    | Source Path                  | Target                                               |
+------------------+------------------------------+------------------------------------------------------+
| core-12.t3c.test | /styleguide-demo-177/bullets | https://core-12.t3c.test/styleguide-demo-177/bullets |
+------------------+------------------------------+------------------------------------------------------+

Sadly, there is no real marking/visual state for that in the backend, neither
in the page module nor in the redirects management module. However, check them
and find them (search by source path) in the module and delete them. That removes
the invalid redirect and thus the log entry.

For TYPO3 v13 there has been some slightly improvements to mark them correspondingly,
if the cli tool is used and make them visible/filterable in the backend - or at least
there are pending patches (in work/progress) to improve that in general. It is planed
to try to improve that further, also @Guido Schmechel wanted to contribute further changes in
this area.

However, this is not a bug - the logging is intended, and the issue is the not removed
redirects.

We will see if we can check that (performantly) on slug changes in the future and remove
self-referencing redirects directly - or mark them in the redirects middleware as conflicting
(and thus logging only once when hit).

Even that no redirect is happening is inteted (and the guard) to keep the page available.

I hope it is okay to close this issue due to not being a bug. If you think this is wrong,
ask to reopen it (with some explantion why and what you expect/why you disagree) in the
issue here or pinging in the TYPO3 Slack channel #typo3-cms-coredev pasting the issue.

Actions

Also available in: Atom PDF