Mismatched entity and/or field definitions

Created on 3 August 2021, over 3 years ago
Updated 2 April 2024, 8 months ago

Hi team,

On updating the Compact date/time range formatter to the latest version 2.0.0, getting the following error.

Mismatched entity and/or field definitions
The following changes were detected in the entity type and field definitions.
Compact date range format
The Compact date range format entity type needs to be installed.

TypeError: Argument 1 passed to Drupal\daterange_compact\DateRangeCompactFormatter::derivePatterns() must implement interface Drupal\daterange_compact\Entity\DateRangeCompactFormatInterface, null given, called in /code/modules/contrib/daterange_compact/src/DateRangeCompactFormatter.php on line 63 in Drupal\daterange_compact\DateRangeCompactFormatter->derivePatterns() (line 96 of /code/modules/contrib/daterange_compact/src/DateRangeCompactFormatter.php)

Drupal core version installed ->8.9.17

🐛 Bug report
Status

Closed: outdated

Version

2.0

Component

Code

Created by

🇮🇳India divya.lakshman

Live updates comments and jobs are added and updated live.
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.

  • First install and enable entity_update module then use patch #8

  • Status changed to Needs work about 1 year ago
  • 🇺🇸United States COBadger

    The patch in comment 10 🐛 Mismatched entity and/or field definitions Needs work solved this problem for me, but it seems as though this needs test coverage so I'm marking this as "needs work".

  • Status changed to Closed: outdated 8 months ago
  • 🇸🇪Sweden erik.erskine

    Tentatively marking this as outdated, because there was never an upgrade path from version 1 (dev release only) to version 2.

    If anyone comes across this on a format created with version 2.x please reopen this issue.

    It has never been possible to automatically "upgrade" a format from v1 to v2. In v1 there were separate patterns dates vs date+times, whereas in v2 these are combined. Any attempt to merge these needs manual intervention. At this point it becomes just as easy to recreate them from scratch.

    This is one of the reasons there was never a stable 1.x release - only ever a dev release.

Production build 0.71.5 2024