Mismatched entity and/or field definitions

Created on 9 December 2023, 11 months ago
Updated 10 April 2024, 7 months ago

Hi,
I've been getting the following error message since one of the recent updates, I think it started with an update to Drupal 9.5.10, and continues now with 10.1.6:

Mismatched entity and/or field definitions
The following changes were detected in the entity type and field definitions.
Redirect

The Redirect entity type needs to be installed.

I don't know how to find out the field or entity that causes this error. Any help would be most appreciated.
Thanks,
Dana

💬 Support request
Status

Closed: works as designed

Version

1.9

Component

Miscellaneous

Created by

🇮🇱Israel gdana

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

Comments & Activities

  • Issue created by @gdana
  • Status changed to Needs review 10 months ago
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7
    last update 10 months ago
    63 pass
  • 🇮🇳India keshavv India

    Created patch for Mismatched entity and/or field definitions.
    Please review.

  • 🇮🇱Israel gdana

    Hi, thank you. Unfortunately it didn't help, I applied the patch and then as required ran a small database update, but afterwards I still get the same message.
    FYI I'm using Drupal 10.1.6 with PHP 8.2.

  • Status changed to Needs work 10 months ago
  • 🇮🇳India keshavv India

    Hello @gdana, Please try this https://www.drupal.org/project/address/issues/3412241#comment-15408612 🐛 Mismatched field definitions after address upgrade Needs review

  • 🇮🇱Israel gdana

    Hi @keshavv, thanks, just to make sure I understand your suggestion in the comment you referred to, since we're talking about redirect, no need for the loop, just do it for redirect (and is 'redirect' the correct entity type id)?

       $entity_type_manager = \Drupal::entityTypeManager();
       $entity_type_manager->clearCachedDefinitions();
       
       $entity_type = $entity_type_manager->getDefinition('redirect');
       \Drupal::entityDefinitionUpdateManager()->installEntityType($entity_type);
    
    
  • Status changed to Closed: works as designed 7 months ago
  • 🇮🇱Israel gdana

    Hi, I found out that this module isn't the source of the issue I've described, it's a different module that also redirects and uses entities called redirect. I'm closing the issue, thanks for the help.

Production build 0.71.5 2024