Mismatched entity and/or field definitions

Created on 22 July 2023, about 1 year ago
Updated 30 January 2024, 8 months ago

Problem/Motivation

After upgrading to the 3-x version of the module, I got a problem with "Mismatched entity and/or field definitions".
For some reason, the field storage definitions for the entity_import_status entity weren't stored in the correct way.
So as a result the method getLastInstalledFieldStorageDefinitions from entity.last_installed_schema.repository service returned null for the fields definitions.

Steps to reproduce

Install module version 2.x-dev@dev and then update it to 3.x-dev@dev

Proposed resolution

Add a hook update that will save the correct field storage definition for entity fields. I am unsure if this should be added as part of the module, but probably this can help someone who faces the same issue.

πŸ› Bug report
Status

Needs review

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡¦Ukraine _tarik_ Lutsk

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

Comments & Activities

  • Issue created by @_tarik_
  • Open in Jenkins β†’ Open on Drupal.org β†’
    Core: 10.0.7 + Environment: PHP 8.1 & MySQL 5.7
    last update about 1 year ago
    42 pass
  • @_tarik_ opened merge request.
  • Status changed to Needs review about 1 year ago
  • πŸ‡ΊπŸ‡¦Ukraine _tarik_ Lutsk

    Be aware if plan to use this patch until it is merged into the module.

    If the module implements its update with the same number that was used in the patch then this update will be skipped.
    As a way to avoid this problem, you can change the update number from 8306 to another like 8201 that probably won't be used in the future.

  • πŸ‡ΊπŸ‡ΈUnited States SocialNicheGuru

    you could also take the code and create a custom module

Production build 0.71.5 2024