- ๐บ๐ธUnited States ccjjmartin Austin, TX
Still here in May of 2025, number 33 fixes the issue for me. Ran into this while doing a migration from 7 to 10.2.5 (the patch applies cleanly to this version even though it is 5+ years old). This bug actually prevented nodes from being created in the migration because of the error on the duplicate entry.
- ๐ซ๐ทFrance MacSim
@berdir: I confirm the changes in the MR are still needed.
The issue I encountered was that on a form submit containing a
datetime-local
element, I always had an Exception "The date cannot be created from a format."Dateime::valueCallback()
was callinggetHtml5DateFormat<code> which returns <code>DateFormat::load('html_datetime')->getPattern();
fordatetime-local
anddatetime
elements.
But'html_datetime'
(ie.Y-m-d\TH:i:sO
) is not a valid format to pass to\DateTime::createFromFormat()
in the followingtry / catch
block.Perhaps not handled in the most elegant way possible ; the fix I provided was very specific to the
datetime-local
element butdatetime
element might have the same problem.