Bug #96556
closedRecord edit emits a JavaScript warning (error) in the console when trying to initilize a DateTimePicker field, when backenduser has default language/coredev unset language in userconfiguration (BE_USER->uc)
0%
Description
Can be easyli reproduced:
1. make new/empty install with monorepo/coredev main branch
2. activate styleguide -> install both installsets
3. open webbrowser javascript console
4. Navigate to Page module -> select styleguide frontend -> menu_sitemap
5. Edit content element record on this page (context menu -> edit )
6. Following warning shows up in the webbroser development console:
flatpickr.min.js?bust=b6528527ab614a375b93e0eb912708fba2a41881:2 Error: flatpickr: invalid locale undefined at re (flatpickr.min.js?bust=b6528527ab614a375b93e0eb912708fba2a41881:2:25491) at flatpickr.min.js?bust=b6528527ab614a375b93e0eb912708fba2a41881:2:38570 at y (flatpickr.min.js?bust=b6528527ab614a375b93e0eb912708fba2a41881:2:47971) at x (flatpickr.min.js?bust=b6528527ab614a375b93e0eb912708fba2a41881:2:48258) at E (flatpickr.min.js?bust=b6528527ab614a375b93e0eb912708fba2a41881:2:48707) at o.initializeField (DateTimePicker.js?bust=b6528527ab614a375b93e0eb912708fba2a41881:13:1577) at DateTimePicker.js?bust=b6528527ab614a375b93e0eb912708fba2a41881:13:1360
Also see attached image:
This should be fixed in two steps:
1. ensure JavaScript do not emits warning and additional fallback to default userlocale as with empty language key (instead of undefined which leads to this error).
2. Ensure on the server side for the ajax endpint which loads the userconfig that alwas a language key is added, even if not saved yed (at best directly return default language / en instead of empty)
Point 2 should be addressed in a follow up / dedicated patch, this issue/patch addresses the first one.
Could only reproduce this on main, not in 11.5 and not tested lower ....
Files
Updated by Gerrit Code Review almost 3 years ago
- Status changed from New to Under Review
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/+/73036
Updated by Gerrit Code Review over 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/+/73036
Updated by Stefan Bürk over 1 year ago
- Status changed from Under Review to Closed