Review main Abandoned

67361[TASK] Remove language information in page/list module if not needed

Georg Ringer CR 0 V 0 Easy +15 −4 updated 02/26/25, 20:16

Commit message

If a site uses only one language, the flag and label of the language can
be removed from every content element in the page module and every
record in the list module as there is no benefit for an editor.

This leads to a cleaner interface.

Review

  • Code review CR 0
  • Verified V 0

Issues 1

Files 3

Review log 1720

  1. Georg Ringer uploaded patch set 1 01/08/21, 09:06

  2. Georg Ringer commented on patch set 1 01/08/21, 09:06

    This change is ready for review.
  3. TYPO3com voted on patch set 1 V +1 01/08/21, 09:17 Completed build in 11m 09s on Fri, 8 Jan, 09:17 AM Test Summary: 32569 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8752

  4. Oli Bartsch commented on patch set 1 CR -1 01/08/21, 09:33

    There are obviously more modules which need to be unified then. E.g. workspaces.

    GridColumnItem.php:173

    Calling the above three lines for every single item over an over again does not seem to make sense - performance wise. Especially in multi language setups with a lot of content elements. What about some general flag for this?
  5. Benni Mack commented on patch set 1 01/08/21, 12:23

    GridColumnItem.php:173 Reply

    hmm, I don't know a better solution actually without going much into the Fluid-Page-Module hell. In addition, I think it's not a huge performance problem tbh, as this is standard PHP getters / loops. ... the longer I think of it... maybe we could check for the site directly and ask for the languages of the site. Otherwise a translator with only one language accessible does not see the language flags anymore.
  6. Daniel Goerz commented on patch set 1 01/08/21, 12:31

    GridColumnItem.php:173 Reply

    The better solution would be to move this logic into the Context object and have a getter for it, too. if ($context->hasTranslations())
  7. Oli Bartsch commented on patch set 1 01/08/21, 13:09

    GridColumnItem.php:173 Reply Unresolved

    +1. That was actually my idea with the "some general flag".
  8. Xavier Perseguers commented on patch set 1 02/19/21, 14:41

    Could we please get this into v10 as well? v9 was clean, v10 is not anymore.
  9. Claus Due uploaded patch set 2 08/13/21, 11:20

  10. core-ci voted on patch set 2 V -1 08/13/21, 11:44 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/14945

  11. Claus Due uploaded patch set 3 08/13/21, 13:02

  12. core-ci voted on patch set 3 V +1 08/13/21, 13:22 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/14964

  13. Andreas Kienast commented on patch set 3 CR -1 08/13/21, 13:27

    PageLayoutContext.php:126

    Why do I need at least three languages to have "multiple" languages?
  14. Claus Due commented on patch set 3 08/13/21, 13:33

    PageLayoutContext.php:126 Reply

    One is the "all languages" virtual language (index -1) Second is the "default language" semi-virtual language (index 0) Third and subsequent languages are the actual additional languages (index 1 and above) So a condition of > 2 means "are there any languages defined in addition to all languages and default language".
  15. Andreas Kienast commented on patch set 3 CR 0 08/13/21, 13:37

    PageLayoutContext.php:126 Reply

    I see, thanks for the explanation.
  16. Oli Bartsch commented on patch set 3 CR -1 08/17/21, 13:24

    PageLayoutContext.php:126 Reply Unresolved

    However, counting languages does not look sufficient here. What if user has no access to -1? In this case the check is wrong. Please let's make this explicit with something like: array_filter($this->siteLanguages, static fn (SiteLanguage $language) => $language->getLanguageId() > 0) !== [];
  17. Benni Mack commented on patch set 3 10/15/21, 12:11

    What's the status here? AFAICS this has been fixed differently in master / v11.
  18. Georg Ringer abandoned the change 10/19/21, 18:44

    still unresolved in master but abandoned now
  19. Georg Ringer restored the change 02/26/25, 19:56

  20. Georg Ringer abandoned the change 02/26/25, 20:16