Do you see one of the following errors in your Drupal 8+ Status Report?
Mismatched entity and/or field definitions
The XXX field needs to be updated.
The XXX field needs to be uninstalled.
This is caused by mismatch in the field (storage) definitions and the configuration.
Technically it means, the configuration is out of sync with the field (storage) definitions and typically this is caused by an error when deleting or updating a field or with updated configuration. Also a bug in a module maintaining these fields can cause this mismatch.
So how can you solve this issue?
In the past the favourite trick (or hack) to do this, was to use
drush entup
or similar calls, but this was removed from core:
This command is a drop-in replacement of the legacy
drush entup
ordrush entity-updates
core commands, howeverdrush updb --entity-updates
is no longer supported. Just run thedrush entup
command as before.
https://www.drupal.org/project/devel_entity_updates
So what you'd need now is the https://www.drupal.org/project/devel_entity_updates module. But take care, backups, know what you're doing and read the important information on the module page!
Stop, there's maybe a better way!
A better and hopefully far safer way is to resave the field configuration in the Drupal Field UI!
Before proceeding, better first create a backup, if something goes wrong.
The XXX field needs to be updated.
If you run into this issue, you typically need to resave the field or the field storage!
For that go to your Entity Type > Manage Fields > Edit the XXX field and just resave it. (/admin/structure/types/manage/BUNDLE/fields/CONTENT_TYPE.BUNDLE.XXX)
If that's not enough, switch to the "Field settings" tab in the field edit form and also resave it. That's the field storage settings form! (/admin/structure/types/manage/BUNDLE/fields/CONTENT_TYPE.BUNDLE.XXX/storage)
The XXX field needs to be uninstalled.
To solve this issue in the UI, simple recreate the field with the same machine name in the listed entity and delete it afterwards. The error should be gone now. If not, you may have made a mistake, propably used the wrong field name or forgot to remove "field_" prefix?