Review main Abandoned

46500[BUGFIX] Different HTTP statuscodes for shortcuts

Dan Kleine - geb. Untenzu CR 0 V 0 Easy +8 −1 updated 03/06/16, 01:18

Commit message

Use different HTTP statuscodes for redirects depending
on the type of the selected shortcut for a page.

* 307 for redirects to rather random pages
 (first subpage, random subpage, parent page)
* 301 for redirects to a well-defined page
 (explicitly selected page)

Review

  • Code review CR 0
  • Verified V 0

Issues 2

Files 1

Review log 9

  1. Dan Kleine - geb. Untenzu uploaded patch set 1 02/05/16, 14:03

  2. Benni Mack voted on patch set 1 CR +1 02/09/16, 05:53

  3. Benni Mack commented on patch set 1 CR -1 02/09/16, 06:07

    actually, this one is a better approach: https://review.typo3.org/#/c/46494/2
  4. Dan Kleine - geb. Untenzu commented on patch set 1 02/12/16, 10:33

    Hey Benni, thanks for the review. Regarding your last comment I would like you to take a look at the discussion in the ticket about this please: https://forge.typo3.org/issues/73148#note-3 I believe that this commit is a fix of a currently wrong implementation in all supported TYPO3 versions. The linked feature may be a nice solution as well, but is a feature. Same topic, but diffent objectives. I therefore propose the following possible scenario: Merge my fix #73148 into master, 7.6 and 6.2, then maybe merge feature #73139 into master.
  5. Markus Klein commented on patch set 1 CR -1 02/12/16, 10:44

    The core has to act passively here, meaning that the average user has no clue about status codes and can cause severe harm to a page if a 301 is sent unintentionally. (it would not be clear to me that choosing a dedicated page is causing a different status code being sent) Therefore the default of 307 is perfectly fine. Of course I see the SEO point, but is TYPO3 the right place for permanent redirects? I would say no, that should be done outside of PHP, directly by the webserver. IMHO 301 can be supported, if it specifically selectable by the user, including a big fat warning about what 301 does. So yes, this is a feature. But you can of course implement this as an extension for older versions, even if this requires some xclassing.
  6. Markus Klein commented on patch set 1 02/19/16, 00:22

    maybe https://docs.typo3.org/typo3cms/extensions/my_redirects/ is the right thing for your editors then.
  7. Christian Kuhn commented on patch set 1 CR -1 02/19/16, 17:38

    i'm with markus at this point. imho the framework should be default be rather reluctant when it comes to 301. main problem is here that browsers do cache that and if a redirect is cached, it is hard to get rid of it again. as with the nature of a cms, shortcut targets may change, too if an editor wants to. thus, i'd rather keep 307 for mostly everything - if this must be changed for seo reasons in specific cases, it should be up to an agency including editor training on the impact, and it should then probably be provided by an extension and not by core.
  8. Andreas Wolf voted on patch set 1 CR -1 03/06/16, 01:17

  9. Andreas Wolf abandoned the change 03/06/16, 01:18

    There are four -1s by core team members. See the ticket for a more detailed description why we don’t want to have this included in the core.