Project

General

Profile

Actions

Bug #73148

closed

Wrong HTTP redirect statuscode for shortcut to selected page

Added by Dan Kleine (Untenzu) about 8 years ago. Updated about 8 years ago.

Status:
Rejected
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2016-02-05
Due date:
% Done:

0%

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

Description

If an editor uses the shortcut feature for pages, then TYPO3 redirects to the desired target page. The HTTP statuscode for the redirect is »307«. SEO guys complained to me, that this status code is wrong, when redirecting to explicitly selected pages.

I remembered that this redirect used 301 in the past and and after a quick search I found the reason for this change in ticket #56423. In this ticket the author criticizes that the redirect used »301« for all redirects except random subpages. The discussion correctly pointed out, that shortcuts to rather random pages (like „First Subpage“ or „Random Page“) are dynamic and subject to change, and therefore should use 307 as statuscode.

Instead of switching the condition for type of the shortcut the applied solution was to remove the condition completely and now use »307« for all redirects.

As stated above this is wrong. When the editor sets a shortcut to an explicitly selected page, then TYPO3 should use 301 as statuscode. If the editor uses one of the three other shortcut types currently possible, then statuscode 307 should be used.

I would like to send a patch to fix the previously applied patch of ticket 56423. The bug was introduced in 6.2 and now exists in all supported TYPO3 Versions.


Related issues 3 (0 open3 closed)

Related to TYPO3 Core - Bug #56423: Page shortcuts redirect with HTTP Status 301 and get cached on some devicesClosed2014-02-28

Actions
Related to TYPO3 Core - Feature #73139: Allow to select redirect code for doktype shortcutRejected2016-02-05

Actions
Related to TYPO3 Core - Feature #69330: As a editor of a site i would like to influence the http response status code of redirect that is used for a page of pagetype shortcut because then i have more control over a SEO paramenterClosed2015-08-26

Actions
Actions #1

Updated by Gerrit Code Review about 8 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/46500

Actions #3

Updated by Dan Kleine (Untenzu) about 8 years ago

Oh, just saw in Gerrit that Gerald Aistleitner is working on the same topic right now → refs ticket #73139 :)

@Ricardo #73139 is a duplicate of #69330 - But this one here is a bugfix for shortcut redirect introduced in #56423, Gerald however is working on a feature to allow selection of statuscode. Same topic, but diffent objectives.
Possible scenario: Merge #73148 into master, 7.6 and 6.2, then merge #73139 into master.

Actions #4

Updated by Riccardo De Contardi about 8 years ago

Thanks, Dan. Can I close yours?

Actions #5

Updated by Dan Kleine (Untenzu) about 8 years ago

No. I would like to see this fix in the affected TYPO3 versions. The feature Gerald is working on covers the same topic indeed, but, well, its a feature.

(I edited my answer (note 3) previous to your question, maybe this explains a bit more what I meant).

Actions #6

Updated by Riccardo De Contardi about 8 years ago

thank you for your good explanation; I'll close #69330
best regards

Actions #7

Updated by Andreas Wolf about 8 years ago

  • Status changed from Under Review to Rejected

The core team now pretty much decided that this should be done in an extension and not in the core. The main reason is that most editors won’t get the difference and it clutters the system. Additionally, 301 redirects offer a good possibility to shoot yourself in the foot, as they are cached by browsers, so a later change by an editor won’t be so easy.

I did not really check it, but I think this should be easy to implement using the default core hooks. If you need anything special to get it done, get in touch with us (e.g. in #typo3-cms-coredev on Slack).

Actions #8

Updated by Dan Kleine (Untenzu) about 8 years ago

Hey guys, thanks for the review and explanation why this patch set was rejected.

As suggested I created an extension which applies the given patch to the core:

This is a patch extension only. If you want to let editors manage shortcuts to their own needs,
then you should take a look into the following great extensions:

Actions

Also available in: Atom PDF