Mismatched entity and/or field definitions

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.

enter image description here

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.

This article was republished from its original source.
Call Us: 1(800)730-2416

Pixeldust is a 20-year-old web development agency specializing in Drupal and WordPress and working with clients all over the country. With our best in class capabilities, we work with small businesses and fortune 500 companies alike. Give us a call at 1(800)730-2416 and let’s talk about your project.

FREE Drupal SEO Audit

Test your site below to see which issues need to be fixed. We will fix them and optimize your Drupal site 100% for Google and Bing. (Allow 30-60 seconds to gather data.)

Powered by

Mismatched entity and/or field definitions

On-Site Drupal SEO Master Setup

We make sure your site is 100% optimized (and stays that way) for the best SEO results.

With Pixeldust On-site (or On-page) SEO we make changes to your site’s structure and performance to make it easier for search engines to see and understand your site’s content. Search engines use algorithms to rank sites by degrees of relevance. Our on-site optimization ensures your site is configured to provide information in a way that meets Google and Bing standards for optimal indexing.

This service includes:

  • Pathauto install and configuration for SEO-friendly URLs.
  • Meta Tags install and configuration with dynamic tokens for meta titles and descriptions for all content types.
  • Install and fix all issues on the SEO checklist module.
  • Install and configure XML sitemap module and submit sitemaps.
  • Install and configure Google Analytics Module.
  • Install and configure Yoast.
  • Install and configure the Advanced Aggregation module to improve performance by minifying and merging CSS and JS.
  • Install and configure Schema.org Metatag.
  • Configure robots.txt.
  • Google Search Console setup snd configuration.
  • Find & Fix H1 tags.
  • Find and fix duplicate/missing meta descriptions.
  • Find and fix duplicate title tags.
  • Improve title, meta tags, and site descriptions.
  • Optimize images for better search engine optimization. Automate where possible.
  • Find and fix the missing alt and title tag for all images. Automate where possible.
  • The project takes 1 week to complete.