Project

General

Profile

Actions

Bug #99768

closed

Datepicker does not respect user`s preferred UI language

Added by Henrik Ziegenhain about 1 year ago. Updated about 1 year ago.

Status:
Resolved
Priority:
Should have
Assignee:
-
Category:
Backend User Interface
Target version:
-
Start date:
2023-01-31
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
12
PHP Version:
8.1
Tags:
datepicker datetimepicker flatpickr picker pickr
Complexity:
Is Regression:
Yes
Sprint Focus:

Description

Hi,

currently the datepicker (flatpickr) does not respect the users preferred UI language.

Some time ago (#93663) we introduced a separate field in be_users table for selected UI language and kept user->uc['lang'] for backwards compatibility in sync.
This sync got dropped with V12 now.

DateTimePicker tries to load PersistentStorage.get("lang"). This property is empty, so the UI falls back to default/english.

The issue occurs in TYPO3\CMS\Backend\Configuration->getAll() where simply the user->uc is read. But 'lang' always is empty here.

Solution:
- Read lang from user->user['lang'] and merge arrays or
- find a completly better way to get all user configuration

Workaround: Add these lines to UserTs

setup {
  override {
    lang = de
  }
}

This issue is also reported here on StackOverflow: https://stackoverflow.com/questions/74991099/how-to-configure-datetimepicker-in-typo3-12-backend

Actions #1

Updated by Markus Timtner about 1 year ago

Can confirm this also occurs in the current TYPO3 v11 -
IMHO should the timeformat of the datepicker be configurable apart from the user language settting and should use the systems datetime settings.

Actions #2

Updated by Gerrit Code Review about 1 year ago

  • Status changed from New to Under Review

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/78313

Actions #3

Updated by Gerrit Code Review about 1 year ago

Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/78313

Actions #4

Updated by Gerrit Code Review about 1 year ago

Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/78313

Actions #5

Updated by Gerrit Code Review about 1 year ago

Patch set 4 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/78313

Actions #6

Updated by Andreas Fernandez about 1 year ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF