Review main Abandoned

46494[FEATURE] Allow to select redirect code for doktype shortcut

Gerald Aistleitner CR 0 V 0 Easy +38 −2 updated 07/14/16, 10:05

Commit message

A select box is added to page doktype shortcut that allows to select the http redirect code, either permanent (301) or temporary (307), whereas the temporary (307) redirect is the default one to maintain backwards compatibility.

Review

  • Code review CR 0
  • Verified V 0

Issues 2

Files 5

Review log 9

  1. Gerald Aistleitner uploaded patch set 1 02/05/16, 09:52

  2. Gerald Aistleitner uploaded patch set 2 02/05/16, 10:49

  3. Andreas Wolf commented on patch set 2 02/05/16, 13:51

    In general, I like the idea. I would however change the storage mechanism to just use the redirect code.

    pages.php:541

    I would rather use the codes (301, 307) here as the value instead of the full header value.

    ext_tables.sql:134

    I think this should be a tinyint instead and store the redirect code.
  4. Xavier Perseguers commented on patch set 2 CR -1 02/12/16, 11:19

    Please soft wrap your comment

    pages.php:541 Reply

    I double that!

    ext_tables.sql:134 Reply

    definitely

    TypoScriptFrontendController.php:2971

    It should be feasible to transform the tinyint redirect code to a constant name using the `constant($name)` construct.

    PageRepository.php:174

    no need for duplicated that from HttpUtility

    locallang_tca.xlf:315

    Please remove the `xml:space="preserve"` attributes.
  5. Christian Kuhn commented on patch set 2 CR -1 02/19/16, 17:41

    i'm not a big fan of this. the difference between 301 / 307 and others is not easy to understand for editors and the default 307 is the most sane decision from framework point of view in this case. an editor shouldn't be nagged with this details, and usually admins don't think about this, too. i propose to encapsulate this field in an extension that is not part of core to provide this functionality in case it is needed in the first place and if admins / editors do understand the background of this.
  6. Andreas Wolf commented on patch set 2 03/06/16, 00:33

    We decided that this feature should rather go to an extension, although the general idea is nice. Therefore, we abandon this one to clean up the review system.
  7. Andreas Wolf abandoned the change 03/06/16, 00:33

  8. Daniel Goerz commented on patch set 1 07/14/16, 09:46

    Maybe I miss something but how can this be solved in an extension if the redirect is hardcoded to be 307 in the TypoScriptFrontendController? I think this would be a useful feature that is requested from time to time.
  9. Daniel Goerz commented on patch set 2 07/14/16, 10:05

    Well you could obviously XClassing the TypoScriptFrontendController and overwrite the method but I'd rather not do that.