Mismatched entity and/or field definitions

Created on 13 September 2023, about 1 year ago
Updated 28 September 2023, about 1 year ago

After deploy ECA in a Production site, I get this warning in the status report:

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

The ECA entity type needs to be installed.

ECA Model

The ECA Model entity type needs to be installed.

In the source site, a DEV site, I have no warning at all.

In the other hand, all seems OK with ECA (it's running well in both sites)

πŸ’¬ Support request
Status

Closed: won't fix

Version

1.1

Component

Code

Created by

πŸ‡§πŸ‡ΆCaribbean Netherlands calbasi Catalonia

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

Comments & Activities

  • Issue created by @calbasi
  • πŸ‡©πŸ‡ͺGermany jurgenhaas Gottmadingen

    That's strange, it reads as if the entity types from ECA are not known on your production site. But if ECA is enabled correctly, then those entity types must be there. Don't see what we can do as module maintainers to resolve that. Something must be wrong with the installation. You should try refreshing the cache a couple of times, or rebuild the registry of the site, see the core/rebuild.php file in Drupal core's directory.

  • πŸ‡§πŸ‡ΆCaribbean Netherlands calbasi Catalonia

    The strange point, for me is:

    • The error warning is not shown in my DEV site
    • The module is running OK in Production

    I've tried: https://www.drupal.org/node/3034742#comment-14183957 β†’

    without success.

    By the way, I deployed ECA using the usual steps from DEV to Production:

    git pull
    composer install --no-dev
    drush updb
    drush config import
    drush cc

    It was an early version of ECA a year ago...

  • πŸ‡§πŸ‡ΆCaribbean Netherlands calbasi Catalonia

    Not sure if I could just uninstall and reinstall again in Production ECA module... Could it do the trick?

  • πŸ‡©πŸ‡ͺGermany jurgenhaas Gottmadingen

    Not sure if I could just uninstall and reinstall again in Production ECA module... Could it do the trick?

    Sure, I'd always do a db backup first. Just in case. And/or you could copy your production DB to your local installation and see if it is still the same there. This would help with debugging.

  • πŸ‡ΊπŸ‡ΈUnited States freelock Seattle

    I have this warning on several sites, and so far have ignored it without any apparent consequences...

  • Status changed to Closed: won't fix about 1 year ago
  • πŸ‡©πŸ‡ͺGermany jurgenhaas Gottmadingen

    Just re-checked all our installations and it's not there anywhere. Also, I've never seen that elsewhere before. So, I went through the code in Drupal core to find out, what's producing such messages. Found this:

          $original = $this->entityLastInstalledSchemaRepository->getLastInstalledDefinition($entity_type_id);
    
          // @todo Support non-storage-schema-changing definition updates too:
          //   https://www.drupal.org/node/2336895.
          if (!$original) {
            $change_list[$entity_type_id]['entity_type'] = static::DEFINITION_CREATED;
          }
    

    So, Drupal core is not able to track changes of non-storage-schema-changing definition updates yet, see #2336895: Allow entity type and field storage definition objects to be compared for definition equality β†’ . Nothing a module can do about it, need to wait and see if core eventually fixes that.

Production build 0.71.5 2024