Custom D7 date formats not migrated to D9

Created on 2 October 2021, about 3 years ago
Updated 13 September 2024, 3 months ago

Problem/Motivation

Custom date formats created on a Drupal 7 site are not migrated to Drupal 9. These are stored in the "date_formats" table and have the "type" value set to "custom".

Steps to reproduce

Build a Drupal 7 site.
Create custom date formats in admin/config/regional/date-time/formats.
Run the standard upgrade to D9.

Proposed resolution

Provide a migration path for custom date formats.

Remaining tasks

Build a patch/MR.

User interface changes

n/a

API changes

n/a

Data model changes

TBD

Release notes snippet

TBD

🐛 Bug report
Status

Needs work

Version

11.0 🔥

Component
Migration 

Last updated 3 days ago

Created by

🇺🇸United States DamienMcKenna NH, USA

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇳🇿New Zealand quietone

    This is a bugsmash daily triage target.

    @DamienMcKenna, thanks for making the patch!

    This needs confirmation that the changes to the D7 fixture are correct and that the fixture can still be used on a D7 site via the UI. That is, that is it still a working database. This also needs a source plugin test and a migration test.

  • 🇳🇮Nicaragua dinarcon

    Thanks for the patch @DamienMcKenna

    Looking at it covers date formats (i.e. l, F j, Y - H:i), but no date types. (e.g. Long / date_format_long). I think date formats and date types are not two separate configuration entities in Drupal 11. The date type can be mapped to the id/label of the DateFormat configuration entity, and the date format mapped to the pattern. This would require querying the date_format_type and date_formats respectively. Thoughts?

Production build 0.71.5 2024