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

CommentFileSizeAuthor
#2 3250349-2.patch6.08 KBalexpott
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

alexpott created an issue. See original summary.

alexpott’s picture

Status: Active » Needs review
FileSize
6.08 KB

This also has the same fixes and tests as #3250335: #date_date_callbacks is broken in Drupal 9.3

alexpott’s picture

See #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.

longwave’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +Needs change record updates

Looks 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.

  • larowlan committed bb48626 on 9.4.x
    Issue #3250349 by alexpott: \Drupal\Core\Datetime\Element\Datelist::...

  • larowlan committed 5cc55e8 on 9.3.x
    Issue #3250349 by alexpott: \Drupal\Core\Datetime\Element\Datelist::...
larowlan’s picture

Status: Reviewed & tested by the community » Fixed

Committed bb48626 and pushed to 9.4.x. Thanks!

Backported to 9.3.x

alexpott’s picture

I've updated the CR.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.