Mismatched entity and/or field definitions

Created on 9 December 2023, 7 months ago
Updated 10 April 2024, 3 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 5 months ago
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7
    last update 5 months ago
    63 pass
  • 🇮🇳India keshav.k

    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 5 months ago
  • 🇮🇳India keshav.k

    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 3 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.69.0 2024