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

CommentFileSizeAuthor
#2 3407151-2.patch596 byteskeshavv

Comments

gdana created an issue. See original summary.

keshavv’s picture

Status: Active » Needs review
StatusFileSize
new596 bytes

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

gdana’s picture

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.

nisha_j’s picture

Status: Needs review » Needs work
keshavv’s picture

Hello @gdana, Please try first code block in your custom module https://www.drupal.org/project/address/issues/3412241#comment-15408612

gdana’s picture

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);

gdana’s picture

Status: Needs work » Closed (works as designed)

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.