Review TYPO3_8-7 Merged

54503[TASK] Log warning on invalid charset

Stefan Neufeind CR +2 V +2 Easy +4 −0 updated 12/10/17, 10:56

Commit message

This gives users a clear hint if e.g. config.metaCharset contains
an invalid value instead of showing a blank page.

Review

  • Code review CR +2
    • Stefan Neufeind +2
    • Pawel Cieslik +1
    • Mathias Brodala +1
  • Verified V +2
    • Stefan Neufeind +2
    • Pawel Cieslik +1
    • TYPO3com +1 CI

Issues 1

Files 1

Review log 2832

Show 57 earlier messages
  1. Stefan Neufeind uploaded patch set 1 10/30/17, 16:22

  2. Stefan Neufeind commented on patch set 1 10/30/17, 16:24

    For 8.7 we only want to log. Do we do that directly in the CharsetConverter?
  3. Stefan Neufeind commented on patch set 1 V -1 10/30/17, 16:26

    update in a second
  4. Stefan Neufeind uploaded patch set 2 10/30/17, 16:34

  5. TYPO3com voted on patch set 1 V +1 10/30/17, 16:36 Completed build in 13m 41s on Mon, 30 Oct, 05:36 PM Test Summary: 57599 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC87-1131

  6. TYPO3com voted on patch set 2 V +1 10/30/17, 16:44 Completed build in 09m 55s on Mon, 30 Oct, 05:44 PM Test Summary: 57599 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC87-1132

  7. Stefan Neufeind commented on patch set 1 10/30/17, 16:45

  1. Frank Nägler commented on patch set 2 CR -1 10/30/17, 17:56

    temp -1, on it, will push an update
  2. Frank Nägler uploaded patch set 3 10/30/17, 18:00

  3. Frank Nägler voted on patch set 3 CR +1 V +1 10/30/17, 18:00

  4. TYPO3com voted on patch set 3 V +1 10/30/17, 18:10 Completed build in 10m 14s on Mon, 30 Oct, 07:10 PM Test Summary: 57599 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC87-1134

  5. Wouter Wolters voted on patch set 3 CR +1 10/30/17, 20:10

  6. Jörg Bösche voted on patch set 3 CR +1 10/31/17, 16:20

  7. Mathias Brodala commented on patch set 3 11/01/17, 08:05

    Maybe for v8 we could check if the result of the charset conversion is empty in TypoScriptFrontendController::convOutputCharset() and trigger a message there? This would avoid a specific message in a generic component.

    CharsetConverter.php:725

    This should not be added here.

    CharsetConverter.php:782

    This should use GeneralUtility::sysLog() instead to increase visibility for people not that much into TYPO3.
  8. Mathias Brodala commented on patch set 3 11/01/17, 08:23

    CharsetConverter.php:782 Reply

    Strike this, that method is deprecated.
  9. Frank Nägler commented on patch set 3 11/01/17, 08:25

    CharsetConverter.php:725 Reply

    why?
  10. Mathias Brodala commented on patch set 3 11/01/17, 09:01

    CharsetConverter.php:725 Reply

    Because this exception is not thrown here?
  11. Frank Nägler commented on patch set 3 11/01/17, 09:07

    CharsetConverter.php:725 Reply

    correct, but the exception is not catched, so this method will re-throw it.
  12. Mathias Brodala commented on patch set 3 11/01/17, 09:23

    CharsetConverter.php:725 Reply

    That's new then. There are millions of places where exceptions are thrown by internal calls and no @throws indicating them. In fact, listing all exceptions that could be thrown down to the lowest layer would be cumbersome. Or am I misunderstanding something here?
  13. Christian Kuhn commented on patch set 3 11/01/17, 11:04

    CharsetConverter.php:725 Reply

    indeed. it does not make sense to annotate @throws if some other method below throws this. we would end up with having a huge list of @throws on upper level methods. so strictly speaking: no @throws here.
  14. Stefan Neufeind uploaded patch set 4 11/02/17, 13:44

  15. Stefan Neufeind commented on patch set 4 11/02/17, 13:45

    removed the @throws
  16. Mathias Brodala commented on patch set 4 CR +1 11/02/17, 13:48

    I'm basically fine with this for a non-breaking solution.
  17. Stefan Neufeind commented on patch set 4 11/02/17, 13:48

    @Mathias: We could go for convOutputCharset() as you mentioned. But the patch would then be completely different from what we merged in master. Why didn't we do it like that in master then? :-) So for the moment I feel having it in the same place as in master might be the better way. But others may feel different.
  18. TYPO3com voted on patch set 4 V +1 11/02/17, 13:54 Completed build in 09m 39s on Thu, 2 Nov, 02:54 PM Test Summary: 57599 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC87-1148

  19. Pawel Cieslik commented on patch set 4 V +1 11/27/17, 22:03

    patch indeed add warning into log file, but i don't see exception, just a blank page with 200 response code. is this correct?? i tested it on TYPO3_8-7
  20. Stefan Neufeind commented on patch set 4 11/27/17, 22:07

    @Pawel: only master has the exception, 8.7 just logs a warning. that was by intention ... if I understood you right that's what you experienced?
  21. Pawel Cieslik commented on patch set 4 CR +1 11/28/17, 08:57

    > @Pawel: only master has the exception, 8.7 just logs a warning. > that was by intention ... if I understood you right that's what you > experienced? Yes, I can confirm :)
  22. Mathias Brodala commented on patch set 4 11/28/17, 08:58

    > > @Pawel: only master has the exception, 8.7 just logs a warning. > > that was by intention ... if I understood you right that's what > you > > experienced? > > Yes, I can confirm :) Then please also add a V+1. ;-)
  23. Mathias Brodala commented on patch set 4 11/28/17, 08:58

    > > > @Pawel: only master has the exception, 8.7 just logs a warning. > > > that was by intention ... if I understood you right that's what > > you > > > experienced? > > > > Yes, I can confirm :) > > Then please also add a V+1. ;-) ... what you did already, thanks.
  24. Stefan Neufeind commented on patch set 4 CR +2 V +2 11/28/17, 23:12

    tiny change, let's have this
  25. Gerrit merged patch set 4 11/28/17, 23:12