Project

General

Profile

Actions

Bug #93287

closed

Avoid creation of unnecessary redirects on Slug changes

Added by Sybille Peters over 3 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Link Handling, Site Handling & 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 #1

Updated by Sybille Peters over 3 years ago

  • Related to Task #90143: Redirects: Poor performance of redirect matching for large redirects table added
Actions #2

Updated by Sybille Peters over 3 years ago

  • Description updated (diff)
Actions #3

Updated by Sybille Peters over 3 years ago

  • Tags set to redirects
Actions #4

Updated by Sybille Peters over 3 years ago

  • Description updated (diff)
  • Tags changed from redirects to redirects, avoid unnecessary redirects
Actions #5

Updated by Sybille Peters over 3 years ago

Actions #6

Updated by Sybille Peters over 3 years ago

  • Description updated (diff)
  • Tags changed from redirects, avoid unnecessary redirects to redirects, avoid unnecessary redirects,usability
Actions #7

Updated by Oliver Hader over 1 year ago

  • Related to Task #89301: Streamline automatic slug & redirects handling added
Actions #8

Updated by Oliver Hader over 1 year ago

→ continue at #89301

Actions #9

Updated by Oliver Hader over 1 year ago

  • Status changed from New to Closed
Actions

Also available in: Atom PDF