Unknown fieldViewsDataHelper method called from deprecated datetime_type_field_views_data_helper function

Created on 19 June 2025, 4 days ago

Problem

I just tried upgrading from Drupal 11.1.8 to 11.2.0.

composer update went smoothly.

However, drush updatedb did not go well.

I got the following message on the update block_post_update_set_menu_block_depth_to_null_if_zero database update:

Error: Call to undefined method Drupal\datetime\DateTimeViewsHelper::fieldViewsDataHelper() in datetime_type_field_views_data_helper() (line 39 of /var/www/rouen.fr/app/core/modules/datetime/datetime.module)

Looking in the offending file https://github.com/drupal/drupal/blob/11.x/core/modules/datetime/datetime.module, it is specified that:
"datetime_type_field_views_data_helper() is deprecated in drupal:11.2.0 and is removed from drupal:12.0.0. Use \Drupal::service(\β€˜datetime.views_helper\’)->fieldViewsDataHelper($field_storage, $data, $column_name). See https://www.drupal.org/node/3489502 β†’ ."

But when I look for the fieldViewsDataHelpermethod, it does not appear anywhere!

However, there is a method called fieldViewsData in the file https://github.com/drupal/drupal/blob/11.x/core/modules/datetime/src/Hook/DatetimeViewsHooks.php

Could this be an error in the update code?

Steps to reproduce

From a Drupal 11.1.8:

composer update
drush updatedb

πŸ› Bug report
Status

Active

Version

11.2 πŸ”₯

Component

datetime.module

Created by

πŸ‡«πŸ‡·France zigazou

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