Review main Merged

60212[BUGFIX] Check if language is accessible before uri generation

Jonas Schwabe CR +2 V +2 Easy +6 −1 updated 04/17/19, 15:19

Commit message

Sites with error handling were not rendering the correct page for
disabled languages because an inaccessible language was used
internally.

Review

  • Code review CR +2 Done
    • Daniel Goerz +2
    • Jonas Schwabe +1
    • Benni Mack +1
  • Verified V +2 Done
    • Daniel Goerz +2
    • Jonas Schwabe +1
    • Benni Mack +1
    • TYPO3com +1 CI

Issues 1

Files 1

Review log 2836

Show 811 earlier messages
  1. Jonas Schwabe uploaded patch set 1 03/12/19, 08:29

  2. TYPO3com voted on patch set 1 V -1 03/12/19, 08:29 Completed build in 10s on Tue, 12 Mar, 09:29 AM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-32671

  3. Jonas Schwabe uploaded patch set 2 03/12/19, 08:31

  4. TYPO3com voted on patch set 2 V +1 03/12/19, 08:45 Completed build in 13m 46s on Tue, 12 Mar, 09:45 AM Test Summary: 47204 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-32672

  5. Michael Oehlhof commented on patch set 2 03/27/19, 10:33

    Found a little typo in a comment

    Site.php:287

    little typo
  6. Stephan Großberndt commented on patch set 2 03/27/19, 21:39

    PageRouterTest.php:107

    doNotUseInaccessibleLanguage()
  7. Jonas Schwabe uploaded patch set 3 03/29/19, 11:22

  8. Jonas Schwabe commented on patch set 3 03/29/19, 11:24

    Site.php:287 Reply

    I also installed a spellchecker extension ;)

    PageRouterTest.php:107 Reply

    Done
  9. TYPO3com voted on patch set 3 V +1 03/29/19, 11:38 Completed build in 15m 29s on Fri, 29 Mar, 12:38 PM Test Summary: 47261 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-33010

  10. Jörg Bösche voted on patch set 3 CR +1 04/08/19, 13:30

  11. Julian Geils voted on patch set 3 V +1 CR +1 04/09/19, 11:42

  1. Jörg Bösche voted on patch set 3 V +1 04/09/19, 11:42

  2. Daniel Goerz commented on patch set 1 04/09/19, 12:22

    Site.php:296

    I don't quite get why we add this method to the Site Entity. It has nothing to do with the Site but is rather a check for a restriction that the Backend user has in general, right?
  3. Daniel Goerz voted on patch set 3 CR -1 04/09/19, 12:24

  4. Jonas Schwabe commented on patch set 3 04/09/19, 12:40

    Site.php:296 Reply Unresolved

    When I implemented the method here I was assuming that a SiteLanguage might be enabled / disabled based on a Site because the same language might be used for different sites. This initialization is done in the Site Entity constructor ($this->languages) so I thought this might be a good spot to put the check. The backend user settings can override the language access check so this is not really related to backend users either. What do you think about putting this directly into PageRouter?
  5. Daniel Goerz commented on patch set 1 04/09/19, 13:25

    > (1 comment) I think that would make much more sense. Please also check all usages of this method from within the core that are passing languages, to verify that they still work if we add a check on language visibility here.
  6. Benni Mack uploaded patch set 4 04/17/19, 08:26

  7. TYPO3com voted on patch set 4 V +1 04/17/19, 08:37 Completed build in 10m 36s on Wed, 17 Apr, 10:37 AM Test Summary: 47473 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-33297

  8. Jonas Schwabe commented on patch set 4 04/17/19, 08:39

    Sorry for being silent this long. Thanks Benni for uploading this patch set :) We are using my original patch in a production environment and noticed that languages that are marked as not visible in the frontend can actually be accessed without a backend login. I wanted to make sure that this change was not related somehow and that the 'visible in frotnend' flag is not only there to control the language menu. If that was the case that would mean that my original issue was actually by design. I will try to investigate today
  9. Jonas Schwabe commented on patch set 4 04/17/19, 11:11

    I just had a look, the issue where a disabled language was still visible without a backend login is not related to this but to a custom middleware.
  10. Jonas Schwabe voted on patch set 4 V +1 CR +1 04/17/19, 11:38

  11. Jörg Bösche voted on patch set 4 CR +1 04/17/19, 11:47

  12. Daniel Goerz commented on patch set 4 V -1 04/17/19, 12:19

    This still produces an error page if I am logged into the backend and TYPO3 tries to fetch a 404 page in a deactivated language.
  13. Jonas Schwabe commented on patch set 4 04/17/19, 12:25

    > Patch Set 4: Verified-1 > > This still produces an error page if I am logged into the backend and TYPO3 tries to fetch a 404 page in a deactivated language. When you set the error handler to show contents of a selected page it will actually do an http request to fetch this page. The backend login in not available in this case. I'd say that this is a different issue, the page should probably be rendered instead of being proxied from a different URL. I think the other 404 handlers should work as expected in both cases with this patch.
  14. Daniel Goerz uploaded patch set 5 04/17/19, 12:43

  15. Daniel Goerz uploaded patch set 6 04/17/19, 12:44

  16. TYPO3com voted on patch set 6 V +1 04/17/19, 12:57 Completed build in 13m 32s on Wed, 17 Apr, 02:57 PM Test Summary: 47477 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-33302

  17. TYPO3com voted on patch set 5 V +1 04/17/19, 12:58 Completed build in 14m 55s on Wed, 17 Apr, 02:58 PM Test Summary: 47477 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-33301

  18. Benni Mack uploaded patch set 7 04/17/19, 14:32

  19. TYPO3com voted on patch set 7 V +1 04/17/19, 14:45 Completed build in 12m 49s on Wed, 17 Apr, 04:45 PM Test Summary: 47473 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-33303

  20. Benni Mack uploaded patch set 8 04/17/19, 14:47

  21. TYPO3com voted on patch set 8 V +1 04/17/19, 15:00 Completed build in 13m 16s on Wed, 17 Apr, 05:00 PM Test Summary: 47473 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-33304

  22. Jonas Schwabe voted on patch set 8 V +1 CR +1 04/17/19, 15:15

  23. Benni Mack voted on patch set 8 V +1 CR +1 04/17/19, 15:17

  24. Daniel Goerz voted on patch set 8 V +2 CR +2 04/17/19, 15:19

  25. Daniel Goerz merged patch set 9 04/17/19, 15:19