Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
#3213572: #date_time_callbacks and #date_date_callbacks bypass the TrustedCallbackInterface protections converted \Drupal\Core\Datetime\Element\Datetime
to use the trusted callback system. However \Drupal\Core\Datetime\Element\Datelist
also uses #date_date_callbacks
so now we're at a point where we are inconsistent.
Proposed resolution
Fix \Drupal\Core\Datetime\Element\Datelist
to use trusted callbacks.
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
Comment | File | Size | Author |
---|---|---|---|
#2 | 3250349-2.patch | 6.08 KB | alexpott |
Comments
Comment #2
alexpottThis also has the same fixes and tests as #3250335: #date_date_callbacks is broken in Drupal 9.3
Comment #3
alexpottComment #4
alexpottSee #3221398: [Drupal 9.x] Update use of date_time_callbacks and date_date_callbacks in Webform for how awkward having DateTime and Datelist out-of-sync can be.
Comment #5
longwaveLooks OK to me, converting it to use trusted callbacks and adding a test, but the existing change record that was reused here should be updated to also mention Datelist elements as well as DateTime elements.
Comment #8
larowlanCommitted bb48626 and pushed to 9.4.x. Thanks!
Backported to 9.3.x
Comment #9
alexpottI've updated the CR.