Project

General

Profile

Actions

Bug #93287

closed

Avoid creation of unnecessary redirects on Slug changes

Added by Sybille Peters almost 4 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Site Handling, Site Sets & Routing
Target version:
-
Start date:
2021-01-14
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
11
PHP Version:
Tags:
redirects, avoid unnecessary redirects,usability
Complexity:
Is Regression:
Sprint Focus:

Description

If you create a new page, you can automatically add the page title in the pagetree. But often this does not work, so you end up having to change it again. Also, the URL created directly from the page title may not be the best choice, so you end up changing this again.

For every URL change, a redirect is now created (in sys_redirect).

If the page is very new, I think a redirect is unnecessary. Also, if the page is hidden, a redirect is unnecessary.

Many redirects degrades performance (see #90143). Also, many automatically created redirects make managing of manual redirects more difficult.
And, if you change it back and forth (which may happen over time), you get a redirect loop. Which results in an unusable page.

Another reason: The editor is presented with 3 choices: Go with the change, revert the change, revert the redirect. This is cognitive overload, especially for a new editor. So preventing this for new pages may also make TYPO3 a little more easily usable, especially at the beginning when you are creating new pages.

... so I think it is a good strategy to create as little redirects as possible.

I think you could avoid this, by

- not creating redirects for redirects from or to "default-title" (or whatever the default title is set to)
- not creating redirects for changed slugs if the page is hidden (or in another way not available)
- not creating redirects for very new pages
- and merging redirect chains (#93288) and avoid redirect loops (#89301) (but that is a separate issue)

Reproduce (creating unnecessary redirects)

1. Create a new page using the default title (hidden)
2. change the slug (still hidden)

etc.

You will now have a redirect for the page. You can check in sys_redirect table.

Here an example, after changing /test-1/urls/default-title and doing this again for a hidden subpage.

select uid,FROM_UNIXTIME(createdon),source_path,target from sys_redirect where source_path like '/test-1/urls%' order by uid limit 5;
+-----+--------------------------+------------------------------------+---------------------------------+
| uid | FROM_UNIXTIME(createdon) | source_path                        | target                          |
+-----+--------------------------+------------------------------------+---------------------------------+
|  12 | 2021-01-14 08:28:31      | /test-1/urls/default-title         | /test-1/urls/subpage            |
|  13 | 2021-01-14 08:36:28      | /test-1/urls/subpage/default-title | /test-1/urls/subpage/subsubpage |

-----------------------------+------------------------------------+---------------------------------+

Related issues 3 (2 open1 closed)

Related to TYPO3 Core - Task #90143: Redirects: Poor performance of redirect matching for large redirects tableUnder Review2020-01-17

Actions
Related to TYPO3 Core - Feature #93288: Merge redirect chainsClosed2021-01-14

Actions
Related to TYPO3 Core - Task #89301: Streamline automatic slug & redirects handlingAccepted2019-09-29

Actions
Actions

Also available in: Atom PDF