To recreate: 1. Go to Tools > News or Tools > HTML customization 2. Make a New entry. Set a Publication date and Expiration date. ( if you leave them unset thats OK too, you will still experience the bug) 3. Save the entry 4. Open it again with either CodeMirror or TinyMCE. 5. The Publication date and Expiration date are set far into the future ( for me it is always setting it to 08/06/2026 ) 6. Your content will no longer appear in the area it is supposed.
Apologies, I may have been too quick in blaming this on Flatpickr or Bug 28961. This may have more to do with Bug 24387.
It does appear to be Flatpickr and date Formats. When the dateformat string that is passed to the Flatpickr config is set to 'Y-m-d' it properly sets the date. With all other date formats it sets a wrong date.
Created attachment 126418 [details] [review] Bug 29254: Fix date formatting on the additional contents form We are sending ymd but flatpickr is expecting a 'dateformat' formatted date. Test plan: Create a new content, set a date, save, edit again => The date must be displayed correctly
Here is our friend again: FAIL koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt FAIL valid_template Attempt to reload Koha/Template/Plugin/Branches.pm aborted. Compilation failed in require at /usr/lib/x86_64-linux-gnu/perl5/5.28/Template/Plugins.pm line 206.
Created attachment 126422 [details] [review] Bug 29254: Fix date formatting on the additional contents form We are sending ymd but flatpickr is expecting a 'dateformat' formatted date. Test plan: Create a new content, set a date, save, edit again => The date must be displayed correctly Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Taking liberty to PQA in one pass
Created attachment 126451 [details] [review] Bug 29254: Fix date formatting on the additional contents form We are sending ymd but flatpickr is expecting a 'dateformat' formatted date. Test plan: Create a new content, set a date, save, edit again => The date must be displayed correctly Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Adding my sign-off here for good measure. Works with all dateformat options. Thanks Jonathan and Marcel.
Pushed to master for 21.11, thanks to everybody involved!
*** Bug 29276 has been marked as a duplicate of this bug. ***