0

i got back a projet which is using the module views_date_format_sql. This module is not compatible with D9, so I'm trying to find a replacement

But I don't get what this module is supposed to do. If I disable it, it doing a cascade of disabling config views/node etc...

Can anyone tell me what's the purpose of this plugin ?

enter image description here

1 Answer 1

0

From the Views Date Format SQL project page:

The Views Date Format SQL module allows to format date fields using SQL. This enables group aggregation for date fields using the choosen granularity.

The core functionality is to remove the date formatting from render() and put it in query(). I.e. format date values using SQL's DATE_FORMAT rather than PHP's format_date. This is achieved by assigning a new default handler to node 'created' and 'changed' date fields. This handler extends and overrides views's built in views_handler_field_date.

After a review of the module, you'll see that this new default handler is "views_date_format_sql_field".

As far as how this is being used on your site, you'll need to figure that out for yourself. I'd start by reviewing the views that get disabled when you would uninstall the module - check for any timestamp fields, e.g. 'created' or 'changed'. The fastest way might be to scan the config files for "views_date_format_sql_field", the new default handler the module adds. Once you know where the module is being used, you can determine what effect removing it would have.


Alternatively, it may be simpler to make the module D9 compatible. Many Drupal 8 modules are Drupal 9 compatible after a simple change to their .info.yml file - replacing core: 8.x with core_version_requirement: ^8 || ^9.

1
  • I appreciate your help. For now, the module was forked to be D9 compatible, but I didn't know what it was doin.
    – user104792
    Jun 24, 2021 at 14:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy