Bug #93287

Avoid creation of unnecessary redirects on Slug changes

Added by Sybille Peters about 2 months ago. Updated about 2 months ago.

Status:
New
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

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 chainsNew2021-01-14

Actions
#1

Updated by Sybille Peters about 2 months ago

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

Updated by Sybille Peters about 2 months ago

  • Description updated (diff)
#3

Updated by Sybille Peters about 2 months ago

  • Tags set to redirects
#4

Updated by Sybille Peters about 2 months ago

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

Updated by Sybille Peters about 2 months ago

#6

Updated by Sybille Peters about 2 months ago

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

Also available in: Atom PDF