1

almost every time I delete a field in my product types I get this message popping up in my dashboard :

ENTITY/FIELD DEFINITIONS Mismatched entity and/or field definitions The following changes were detected in the entity type and field definitions. Product The commerce_product.field_produit_labels field needs to be updated.

It has not been possible to update entities with "Drush" for some time.

Why do I have these problems regularly ? This is only with the Commerce module.

How can I correct this? Without breaking my site.

ubuntu@ov-b2b650 ~/www-example-com $ drush entup

In UpdateDBCommands.php line 110:
                                                                                                    
  Drupal removed its automatic entity-updates API in 8.7. See https://www.drupal.org/node/3034742.  
                                                                                                    

entity:updates [--cache-clear [CACHE-CLEAR]] [--no-cache-clear] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-d|--debug] [-y|--yes] [--no] [--remote-host REMOTE-HOST] [--remote-user REMOTE-USER] [-r|--root ROOT] [-l|--uri URI] [--simulate] [--pipe] [-D|--define DEFINE] [--druplicon] [--xh-link XH-LINK] [--notify] [--] <command>

2 Answers 2

1

You can quick-fix it by adding module devel_entity_updates https://www.drupal.org/project/devel_entity_updates and run the command drush entup. Don't forget to export configurations after that.

Also, you can fix it by manually creating an update hook - follow https://www.drupal.org/node/3034742#comment-13097250

2
  • Ok thank you, why do you have to export ?
    – sdfff
    Aug 23, 2020 at 10:40
  • just to be safe if something changed and that configuration is same as in database
    – Ales
    Aug 23, 2020 at 14:43
0

You need to enable or install the devel entity updates first before running drush entup command.

Install Devel Entity Updates Module with composer (Source: https://www.drupal.org/project/devel_entity_updates)

composer require 'drupal/devel_entity_updates:^3.0' (or composer require drupal/devel_entity_updatesto automatically get the latest version)

Enable Devel Entity Updates Module

drush en devel_entity_updates

Hope this will work for you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.