I have no idea how to fix this, I don’t even understand what the problem is.
Mismatched entity and/or field definitions
The following changes were detected in the entity type and field definitions.
Taxonomy term
The Term ID field needs to be installed.
The UUID field needs to be installed.
The Language field needs to be installed.
The Vocabulary field needs to be installed.
The Name field needs to be installed.
The Description field needs to be installed.
The Weight field needs to be installed.
The Term Parents field needs to be installed.
The Changed field needs to be installed.
The Default translation field needs to be installed.
The taxonomy_term.field_icon field needs to be installed.
The taxonomy_term.field_link field needs to be installed.
The taxonomy_term.field_meta_tags field needs to be installed.
I tried drush entity-updates
but it finishes on error:
Character set 'utf8mb4' is not a compiled character set and is not specified
in the '/usr/share/mysql/charsets/Index.xml' file
PHP Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in /var/www/vhosts/mysite/httpdocs/core/lib/Drupal/Component/Serialization/Yaml.php on line 54
Drush command terminated abnormally due to an unrecoverable error. [error]
Error: syntax error, unexpected 'class' (T_CLASS), expecting
identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in
/var/www/vhosts/mysite/httpdocs/core/lib/Drupal/Component/Serialization/Yaml.php,
line 54
EDITED (after fixing drush install) I get the following for drush entity-updates
-sh-4.1$ drush entity-updates
The following updates are pending:
taxonomy_term entity type :
The UUID field needs to be installed.
The Language field needs to be installed.
The Vocabulary field needs to be installed.
The Name field needs to be installed.
The Description field needs to be installed.
The Weight field needs to be installed.
The Term Parents field needs to be installed.
The Changed field needs to be installed.
The Default translation field needs to be installed.
The taxonomy_term.field_icon field needs to be installed.
The taxonomy_term.field_link field needs to be installed.
The taxonomy_term.field_meta_tags field needs to be installed.
Do you wish to run all pending updates? (y/n): y
DrupalCoreEntityEntityStorageException: Exception thrown while performing a schema update. Cannot add unique key [error]
taxonomy_term_field__uuid__value to table taxonomy_term_data: unique key already exists. in
DrupalCoreEntitySqlSqlContentEntityStorage->wrapSchemaException() (line 1470 of
/var/www/vhosts/mysite/httpdocs/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).
Failed: DrupalCoreEntityEntityStorageException: !message in DrupalCoreEntitySqlSqlContentEntityStorage->wrapSchemaException() (line [error]
1470 of /var/www/vhosts/mysite/httpdocs/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).
Cache rebuild complete. [ok]
Finished performing updates.
The bizarre thing is that all these things (field_icon, link, meta_tags..) are installed.
The site has many modules (both custom and from the drupal community) and it works alright. Should I export it all and do a clean install and then import it?
UPDATE
I did not manage to fix this and it was giving very weird problems out of the blue, although the already created content types and nodes worked fine. After 24h+ of non stop working I reset the stype up from a clean install and copied content manually (tried doing the Configuration > Configuration synchronization with single items, but it didn’t work very well).
I can report now that the problem is gone. I have no idea what could have caused it or even when.