I am running Drupal 8.4.2. multi site and on one site :
We are getting the following error when we go to our website /user/login page

“The website encountered an unexpected error. Please try again later.”

We have the Drupal admin open on another system and we have the following in the reports status.
Mismatched entity and/or field definitions
The following changes were detected in the entity type and field definitions.
Content : The node.field_contact field needs to be updated.

In the logs we get the following:
Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42S02]:
Base table or view not found:
1146 Table 'drupal_exceed.node__field_contact' doesn't exist:
SELECT t.* FROM {node__field_contact} t WHERE (entity_id IN (:db_condition_placeholder_0)) AND (deleted = :db_condition_placeholder_1) AND (langcode IN (:db_condition_placeholder_2, :db_condition_placeholder_3, :db_condition_placeholder_4)) ORDER BY delta ASC;
in
Drupal\Core\Entity\Sql\SqlContentEntityStorage->loadFromDedicatedTables()
(line 1165 of /home/www/public_html/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).

I have tried the code here but it does not help in my case

https://www.fuelforbrain.com/drupal-8-mismatched-entity-andor-field-defi...

Not sure if it is relevant or a red herring, but the last module I installed and removed was pure chat that did not want to un-install properly.

Should I create a node__field_contact table in the database?

How else can I get a login working again?

Any ideas on how to resolve this?

Thanks
Peter

Comments

Thuthuka’s picture

I created a table in the drupal database

Create Table brick__field_contact (
bundle	varchar(128),	
deleted	tinyint(4),	
entity_id int(10) unsigned,
revision_id	int(10) unsigned,
langcode varchar(32),
delta int(10) unsigned,	
field_contact_target_id	int(10) unsigned);

I could then login and remove the contact field.