63263[TASK] Initialize datepicker JS in external file
Commit message
Review
-
Code review CR +2 Done
- Christian Kuhn +2
- Björn Jacob +1
-
Verified V +2 Done
- Christian Kuhn +2
- Björn Jacob +1
- core-ci +1 CI
Issues 1
Files 5
- typo3/sysext/core/Documentation/Changelog/master/Important-90264-InitializeDatepickerJSInExternalFile.rst5new+22 −0
- typo3/sysext/form/Classes/ViewHelpers/Form/DatePickerViewHelper.php6+13 −35
- typo3/sysext/form/Configuration/Yaml/FormElements/DatePicker.yaml2+2 −0
- typo3/sysext/form/Resources/Private/Frontend/Partials/DatePicker.html+1 −0
- typo3/sysext/form/Resources/Public/JavaScript/Frontend/DatePicker.jsnew+35 −0
Review log 5273
Show 3448 earlier messages
-
Christian Eßl uploaded patch set 1 02/15/20, 18:39
-
TYPO3com voted on patch set 1 V -1 02/15/20, 18:41 Completed build in 22s on Sat, 15 Feb, 06:41 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-135
-
Christian Eßl uploaded patch set 2 02/15/20, 18:44
-
Georg Ringer commented on patch set 2 02/15/20, 18:45
is there a reason why not always having that as external file? -
Christian Eßl commented on patch set 2 02/15/20, 18:50
> Patch Set 2: > > is there a reason why not always having that as external file? Wanted to make it behave like the TSFE rendered frontend. By default, if removeDefaultJS is not set, in current TYPO3 it would default to "external". However if config.removeDefaultJS is set to "0", some of the js automatically rendered, would still be included inline. Or am I wrong here? (I haven't been using inline js for a long time) -
TYPO3com voted on patch set 2 V +1 02/15/20, 18:58 Completed build in 13m 37s on Sat, 15 Feb, 06:58 PM Test Summary: 71295 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-136
-
Oliver Hader commented on patch set 2 CR -1 02/16/20, 10:42
Actually it just hides potential security issues. CSP will be fine for unsafe-inline. However potential XSS is then directly written to a file. We should add dynamic parameters as data-attributes and let them process by a real external file which is just static and not dynamically generated. -
Christian Eßl uploaded patch set 3 02/16/20, 15:25
-
TYPO3com voted on patch set 3 V -1 02/16/20, 15:43 Completed build in 18m 15s on Sun, 16 Feb, 03:43 PM Test Summary: 1 of 71751 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-175
-
TYPO3com voted on patch set 3 V +1 02/16/20, 17:14 Completed build in 17m 20s on Sun, 16 Feb, 05:14 PM Test Summary: 71295 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-180
-
Björn Jacob commented on patch set 3 02/27/20, 22:03
I like the new solution based on Ollys feedback. I've got another question. Would the new asset controller be of any help (https://github.com/TYPO3/TYPO3.CMS/commit/7e342e74de1b207032b1eaa494357a2cec0d4a11)? In my understanding we could use it to load the static JS file. This would slim down the PHP part. The solution would be different for v9. Or would it be valid to get this one in for master and v9 and improve the situation (as TASK) for v10? -
Christian Eßl commented on patch set 3 03/09/20, 11:55
Good idea. Will rewrite it later to use the new AssetCollector. -
Christian Eßl marked it work in progress 03/09/20, 11:55
-
Christian Eßl uploaded patch set 4 03/27/20, 11:48
-
Christian Eßl commented on patch set 4 03/27/20, 11:49
This change is ready for review. -
TYPO3com voted on patch set 4 V -1 03/27/20, 11:49 Completed build in 36s on Fri, 27 Mar, 11:49 AM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-1825
-
TYPO3com commented on patch set 4 03/27/20, 17:25 Completed build in 25s on Fri, 27 Mar, 05:25 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-1871
-
Christian Eßl uploaded patch set 5 03/27/20, 17:28
-
TYPO3com voted on patch set 5 V +1 03/27/20, 17:39 Completed build in 10m 45s on Fri, 27 Mar, 05:39 PM Test Summary: 73044 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-1872
-
Björn Jacob voted on patch set 5 CR +1 03/27/20, 19:07
-
Guido Schmechel commented on patch set 5 03/27/20, 21:20
Short question: AssetCollector just works for v10, right? -
Christian Eßl commented on patch set 5 03/27/20, 21:37
> Patch Set 5: > > Short question: AssetCollector just works for v10, right? Right. Backporting this to 9.5 would require the already prepared solution in patchset #3. -
Jonas Eberle commented on patch set 5 03/30/20, 20:51
DatePickerViewHelper.php:176Unresolvedthe $attributes parameter has become optional recently -
Georg Ringer commented on patch set 5 CR -1 03/31/20, 02:09
This will break for every site using basic Auth to protect the backend, this needs to be master only and configurable -
Jonas Eberle commented on patch set 5 CR +1 04/12/20, 23:52
TBH I don't see how putting a <script> into HTML would lead to problems with HTTP Auth. If authed for a domain, the browser will auth further requests, too. The exception is XHR where the server would have to send the "Access-Control-Allow-Credentials" header and JavaScript needs to specifically send the credentials but that is not the case here, is it? Also, every code less being inlined is good towards achieving CSP-confirmity (without unsafe-inline) for the backend. -
Oliver Hader commented on patch set 5 04/13/20, 08:12
> Patch Set 5: Code-Review-1 > > This will break for every site using basic Auth to protect the backend, this needs to be master only and configurable You're talking about requesting HTTP Auth for `https://secure.org/typo3/`? Probably then rules just be adjusted for those public resources - I'd be fine with "master only", not sure about the "must be configurable" part... Personally I would not add new feature flags or config options for these things - compiling inline JavaScript is and was a hack... ;-)DatePickerViewHelper.php:103UnresolvedI did not test it (yet)... is the `$datePickerDateFormat` probably missing now? -
Björn Jacob commented on patch set 5 CR 0 04/13/20, 08:16
After reading your comments, I am also for not backporting this one to older versions. In the former days, we had an agreement to not backport patches with template changes. This caused a lot of trouble and confusion for integrators. Anyway, during the next days, we will work on some form patches and discuss (and merge) this one. -
Björn Jacob updated the commit message in patch set 6 04/13/20, 11:17
-
Björn Jacob commented on patch set 6 04/13/20, 11:20
Changed to master only. Wrote stupdid stuff about template changes. Sry, no templates are involved here. But still valid to not have it in v9 since priority bugfix phase lies ahead. -
TYPO3com voted on patch set 6 V +1 04/13/20, 11:29 Completed build in 12m 31s on Mon, 13 Apr, 11:29 AM Test Summary: 73409 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-2438
-
Christian Eßl uploaded patch set 7 04/18/20, 06:39
-
TYPO3com voted on patch set 7 V -1 04/18/20, 06:40 Completed build in 43s on Sat, 18 Apr, 06:40 AM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-2773
-
Christian Eßl uploaded patch set 8 04/18/20, 06:56
-
TYPO3com voted on patch set 8 V -1 04/18/20, 07:24 Completed build in 27m 57s on Sat, 18 Apr, 07:24 AM Test Summary: 13 of 72521 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-2774
-
TYPO3com commented on patch set 8 04/18/20, 08:34 Completed build in 16m 48s on Sat, 18 Apr, 08:34 AM Test Summary: 73627 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-2776
-
Jonas Eberle commented on patch set 8 V +1 CR +1 04/18/20, 10:39
This keeps the functionality as it was before. Anyways: Setting [SYS][ddmmyy] or [SYS][USdateformat] any different from the standard really breaks JS in FormEngine and date output in web_layout in v9 and master. >> https://forge.typo3.org/issues/91105 -
Jonas Eberle commented on patch set 8 04/18/20, 11:08
DatePickerViewHelper.php:158this seems unused and could be removed -
TYPO3com voted on patch set 8 V +1 06/05/20, 11:55 Completed build in 13m 18s on Fri, 5 Jun, 11:55 AM Test Summary: 72830 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-3854
-
Daniel Haupt uploaded patch set 9 11/27/20, 18:38
-
Daniel Haupt commented on patch set 9 11/27/20, 18:39
DatePickerViewHelper.php:158ReplyI think we still need the format conversion, so I've re-added it to the latest patch set. -
TYPO3com voted on patch set 9 V +1 11/27/20, 18:49 Completed build in 11m 35s on Fri, 27 Nov, 06:49 PM Test Summary: 32394 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-7656
-
Jonas Eberle updated the commit message in patch set 10 06/09/21, 19:37
-
Jonas Eberle commented on patch set 10 V +1 CR +1 06/09/21, 20:00
I've removed the reference to config.removeDefaultJS form the commitmessage because that won't have any effect with AssetCollector. Apart from that I would rather deprecate dependencies on jQ + jQueryUI (even if only optional and only frontend), this works as advertised! 😊 -
Christian Kuhn rebased onto patch set 11 06/09/21, 22:23
-
core-ci voted on patch set 11 V +1 06/09/21, 22:31 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/12253
-
Jonas Eberle voted on patch set 11 V +1 CR +1 06/10/21, 07:21
-
Oli Bartsch commented on patch set 11 06/10/21, 10:06
Works for me. However, not sure about the "request public resource from /typo3/" part. As already said in above comments, this directory may be protected in some installations. -
Jonas Eberle commented on patch set 11 06/10/21, 11:36
Reply Unresolved
When restricting /typo3/, excluding /typo3/sysext/*/Resources/Public/ is necessary anyways IMHO. There is at least already sysext/seo/Resources/Public/CSS/Sitemap.xsl which is meant for the frontend.
-
Björn Jacob voted on patch set 11 V +1 CR +1 08/11/21, 07:15
-
waldhacker uploaded patch set 12 08/11/21, 11:26
-
core-ci voted on patch set 12 V +1 08/11/21, 11:40 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/14575
-
Björn Jacob commented on patch set 12 08/11/21, 11:57
Two minor nitpicks.DatePickerViewHelper.php:75Would write "JavaScript". Nitpick, I know.DatePicker.yaml:135"an http basic auth" -
waldhacker commented on patch set 13 08/11/21, 12:00
Published edit on patch set 12. -
waldhacker commented on patch set 13 08/11/21, 12:00
DatePickerViewHelper.php:75ReplyDoneDatePicker.yaml:135ReplyDone -
Björn Jacob updated the commit message in patch set 14 08/11/21, 12:07
-
core-ci voted on patch set 13 V +1 08/11/21, 12:15 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/14582
-
core-ci voted on patch set 14 V +1 08/11/21, 12:17 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/14583
-
waldhacker uploaded patch set 15 08/11/21, 14:38
-
core-ci voted on patch set 15 V +1 08/11/21, 14:52 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/14605
-
Björn Jacob commented on patch set 16 08/11/21, 15:11
Published edit on patch set 15. -
Björn Jacob commented on patch set 16 V +1 CR +1 08/11/21, 15:13
Renamed .rst (my fault). Ready now. -
core-ci voted on patch set 16 V +1 08/11/21, 15:23 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/14608
-
Christian Kuhn uploaded patch set 17 08/12/21, 12:55
-
Christian Kuhn commented on patch set 16 08/12/21, 12:55
Important-90264-InitializeDatepickerJSInExternalFile.rst:14#Some ? -
Björn Jacob commented on patch set 17 08/12/21, 13:00
Important-90264-InitializeDatepickerJSInExternalFile.rst:14ReplySo "some" is not fine? Do you prefer a different wording? > If an installation restricts requesting public resources from `/typo3/`, there is a new YAML configuration to override the default path. Something like that? If this is the problem, I can come up with a better text. -
Björn Jacob voted on patch set 17 V +1 CR +1 08/12/21, 13:07
-
Christian Kuhn commented on patch set 17 08/12/21, 13:07
Important-90264-InitializeDatepickerJSInExternalFile.rst:14ReplyAll good. just removed the # ;) -
core-ci voted on patch set 17 V -1 08/12/21, 13:15 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/14725
-
core-ci voted on patch set 17 V +1 08/12/21, 13:23 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/14725
-
Christian Kuhn voted on patch set 17 V +2 CR +2 08/12/21, 13:26
-
Christian Kuhn merged patch set 18 08/12/21, 13:26
-
Jonas Eberle commented on patch set 18 08/12/21, 13:38
Important-90264-InitializeDatepickerJSInExternalFile.rst:17while it is still fresh and before Blog posts and docs have been written, could we add a 't' to the 'JavaScrip'? datePickerInitializationJavaScriptFile -
Björn Jacob commented on patch set 18 08/12/21, 13:40
Important-90264-InitializeDatepickerJSInExternalFile.rst:17Reply UnresolvedI will take care. Thanks for this finding.