Date based template_preprocess BC code is incorrect

Created on 1 May 2025, 3 days ago

Problem/Motivation

Just noticed when rebasing πŸ› Datetime and Datelist elements should render as fieldsets Needs work that all of the functions called from date related preprocessors are calling BC code incorrectly.

function template_preprocess_datetime_form(&$variables): void {
  @trigger_error(__FUNCTION__ . '() is deprecated in drupal:11.2.0 and is removed from drupal:12.0.0. Initial template_preprocess functions are registered directly in hook_theme(). See https://www.drupal.org/node/3504125', E_USER_DEPRECATED);
  \Drupal::service(ThemePreprocess::class)->preprocessDatetimeForm($variables);
}

preprocessDatetimeForm does not exist on that class, rather it's on \Drupal\Core\Datetime\DatePreprocess

Will open an issue.

Steps to reproduce

Call the BC code.

Proposed resolution

Fix it.

πŸ› Bug report
Status

Active

Version

11.0 πŸ”₯

Component

theme system

Created by

πŸ‡¦πŸ‡ΊAustralia acbramley

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024