Review main Merged

68192[FEATURE] Use database field be_users.lang for UI language

Benni Mack CR +2 V +2 Hard +320 −71 updated 03/08/21, 13:14

Commit message

Historically (even before TYPO3 3.3.0), the UI language (the language of
the TYPO3 Backend of a user) is stored in ->uc['lang'], which is only
filled from the database field be_users.lang when a user logs in the
first time.
be_user.lang is/was used for admins when creating users to set a default
language when the user first logs in for the first time, but is never
used afterwards.

However, using "uc[lang]" in various places does not make life easier
because uc always needs to be unpacked (e.g. for sending bulk mails
to users, or changing languages for users as admins, listing
users' preferred languages in list module).

For this reason, be_users.lang now defines the users' UI language,
however uc[lang] is synced on each login of a user now, if the language
has changed.

In addition, the TCA for be_users.lang is now handled via an
itemsProcFunc, making uncached requests a tiny bit faster as Locales are
not populated during TCA creation, and allows for more features such as
dynamically showing available/downloaded languages in a be_users
FormEngine field.

The Setup module now updates be_users.lang instead of uc[lang],
which makes it easier in the future to use native TCA for rendering
the setup module fields.

An upgrade wizard migrates all "uc[lang]" values into "be_users.lang"
and ensures that empty values are never used, instead
"default" (= English) is added to all user records to have an explicit
value (also for new users).

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
    • Oli Bartsch +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • Oli Bartsch +1
    • TYPO3com +1 CI
    • core-ci +1 CI

Issues 1

Files 21

Review log 1330

Show 35 earlier messages
  1. Benni Mack uploaded patch set 1 03/05/21, 10:59

  2. TYPO3com voted on patch set 1 V -1 03/05/21, 11:05 Completed build in 06m 02s on Fri, 5 Mar, 11:05 AM Test Summary: 3561 of 32983 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-9861

  3. core-ci voted on patch set 1 V -1 03/05/21, 11:12 Core CI is not happy: https://core.b13.com/typo3-core/typo3.cms/-/pipelines/1194

  4. Benni Mack uploaded patch set 2 03/05/21, 12:48

  5. Benni Mack uploaded patch set 3 03/05/21, 12:52

  1. TYPO3com voted on patch set 2 V -1 03/05/21, 12:56 Completed build in 08m 19s on Fri, 5 Mar, 12:56 PM Test Summary: 3778 of 32983 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-9864

  2. TYPO3com voted on patch set 3 V +1 03/05/21, 13:04 Completed build in 11m 57s on Fri, 5 Mar, 01:04 PM Test Summary: 32742 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-9866

  3. core-ci voted on patch set 2 V -1 03/05/21, 13:05 Core CI is not happy: https://core.b13.com/typo3-core/typo3.cms/-/pipelines/1197

  4. core-ci voted on patch set 3 V +1 03/05/21, 13:09 Core CI is happy: https://core.b13.com/typo3-core/typo3.cms/-/pipelines/1199

  5. Benni Mack uploaded patch set 4 03/05/21, 14:08

  6. TYPO3com voted on patch set 4 V +1 03/05/21, 14:14 Completed build in 06m 45s on Fri, 5 Mar, 02:14 PM Test Summary: 32742 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-9868

  7. core-ci voted on patch set 4 V +1 03/05/21, 14:18 Core CI is happy: https://core.b13.com/typo3-core/typo3.cms/-/pipelines/1201

  8. Benni Mack uploaded patch set 5 03/05/21, 15:57

  9. TYPO3com voted on patch set 5 V +1 03/05/21, 16:04 Completed build in 06m 49s on Fri, 5 Mar, 04:04 PM Test Summary: 32741 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-9871

  10. core-ci voted on patch set 5 V +1 03/05/21, 16:08 Core CI is happy: https://core.b13.com/typo3-core/typo3.cms/-/pipelines/1204

  11. Markus Klein updated the commit message in patch set 6 03/05/21, 21:10

  12. TYPO3com voted on patch set 6 V +1 03/05/21, 21:16 Completed build in 06m 45s on Fri, 5 Mar, 09:16 PM Test Summary: 32742 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-9872

  13. core-ci voted on patch set 6 V +1 03/05/21, 21:23 Core CI is happy: https://core.b13.com/typo3-core/typo3.cms/-/pipelines/1205

  14. Christian Kuhn commented on patch set 6 CR -1 03/08/21, 11:16

    -1 for now. oli is working on it, too.

    EditDocumentController.php:567 Unresolved

    isset() could be dropped here since this is covered by !empty(), and empty does not raise errors if array does not exist.

    EmailLoginNotification.php:117 Unresolved

    !empty() is sufficient, isset() not needed.

    BackendUserAuthentication.php:2281 Unresolved

    please tag with @deprecated, so we find this in v12 later.

    ext_tables.php:70 Unresolved

    obsolete.
  15. Oli Bartsch uploaded patch set 7 03/08/21, 11:24

  16. TYPO3com voted on patch set 7 V -1 03/08/21, 11:31 Completed build in 06m 28s on Mon, 8 Mar, 11:31 AM Test Summary: 18 of 32986 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-9921

  17. core-ci voted on patch set 7 V -1 03/08/21, 11:34 Core CI is not happy: https://core.b13.com/typo3-core/typo3.cms/-/pipelines/1266

  18. Oli Bartsch uploaded patch set 8 03/08/21, 11:39

  19. TYPO3com voted on patch set 8 V -1 03/08/21, 11:45 Completed build in 06m 14s on Mon, 8 Mar, 11:45 AM Test Summary: 1 of 32986 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-9922

  20. core-ci voted on patch set 8 V +1 03/08/21, 11:54 Core CI is happy: https://core.b13.com/typo3-core/typo3.cms/-/pipelines/1267

  21. TYPO3com voted on patch set 8 V +1 03/08/21, 11:56 Completed build in 23m 11s on Mon, 8 Mar, 11:56 AM Test Summary: 32745 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-9922

  22. Oli Bartsch voted on patch set 8 V +1 CR +1 03/08/21, 12:00

  23. Christian Kuhn voted on patch set 8 V +1 CR +1 03/08/21, 12:55

  24. Christian Kuhn voted on patch set 8 V +2 CR +2 03/08/21, 13:14

  25. Christian Kuhn merged patch set 9 03/08/21, 13:14