0

This question already has an answer here:

After installing mailchimp successfully and uninstalling succesfully I am left with

Mismatched entity and/or field definitions
The following changes were detected in the entity type and field definitions.
Custom block

The block_content.field_subscription field needs to be uninstalled.

in admin/reports/status

I have tried numerous times to install mailchimp again and then unistall it but the error is still there

what is the best way to get rid of it because it creates a problem with entity construction kit module

I have a feeling that mailchimp was not properly uninstalled if I properly uninstalling the module it might clean this error

UPDATE: drush entity-updates can't fix it something is badly broken

I have also removed the mailchimp directory and run update.php but still no go

giorgos@glaptop:~/domain/docroot$ drush entity-updates
The following updates are pending:

block_content entity type : 
  The field block_content.field_subscription needs to be uninstalled
Do you wish to run all pending updates? (y/n): y
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'alpha.dev.block_content__field_subscription' doesn't exist in                                                                [error]
/home/giorgos/domain/docroot/core/lib/Drupal/Core/Database/Statement.php:59
Stack trace:
#0 /home/giorgos/domain/docroot/core/lib/Drupal/Core/Database/Statement.php(59): PDOStatement->execute(Array)
#1 /home/giorgos/domain/docroot/core/lib/Drupal/Core/Database/Connection.php(610): Drupal\Core\Database\Statement->execute(Array, Array)
#2 /home/giorgos/domain/docroot/core/lib/Drupal/Core/Database/Driver/mysql/Connection.php(81): Drupal\Core\Database\Connection->query('UPDATE {block_c...', Array, Array)
#3 /home/giorgos/domain/docroot/core/lib/Drupal/Core/Database/Query/Update.php(148): Drupal\Core\Database\Driver\mysql\Connection->query('UPDATE {block_c...', Array, Array)
#4 /home/giorgos/domain/docroot/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php(1444): Drupal\Core\Database\Query\Update->execute()
#5 /home/giorgos/domain/docroot/core/lib/Drupal/Core/Field/FieldStorageDefinitionListener.php(112):
Drupal\Core\Entity\Sql\SqlContentEntityStorage->onFieldStorageDefinitionDelete(Object(Drupal\field\Entity\FieldStorageConfig))
#6 /home/giorgos/domain/docroot/core/lib/Drupal/Core/Entity/EntityManager.php(429):
Drupal\Core\Field\FieldStorageDefinitionListener->onFieldStorageDefinitionDelete(Object(Drupal\field\Entity\FieldStorageConfig))
#7 /home/giorgos/domain/docroot/core/lib/Drupal/Core/Entity/EntityDefinitionUpdateManager.php(242):
Drupal\Core\Entity\EntityManager->onFieldStorageDefinitionDelete(Object(Drupal\field\Entity\FieldStorageConfig))
#8 /home/giorgos/domain/docroot/core/lib/Drupal/Core/Entity/EntityDefinitionUpdateManager.php(116): Drupal\Core\Entity\EntityDefinitionUpdateManager->doFieldUpdate(3, NULL,
Object(Drupal\field\Entity\FieldStorageConfig))
#9 /opt/drush-8.x/vendor/drush/drush/commands/core/drupal/update.inc(250): Drupal\Core\Entity\EntityDefinitionUpdateManager->applyUpdates()
#10 /opt/drush-8.x/vendor/drush/drush/commands/core/drupal/batch.inc(163): drush_update_entity_definitions(Object(DrushBatchContext))
#11 /opt/drush-8.x/vendor/drush/drush/commands/core/drupal/batch.inc(111): _drush_batch_worker()
#12 /opt/drush-8.x/vendor/drush/drush/includes/batch.inc(98): _drush_batch_command('768')
#13 /opt/drush-8.x/vendor/drush/drush/commands/core/drupal/update.inc(174): drush_batch_command('768')
#14 /opt/drush-8.x/vendor/drush/drush/commands/core/core.drush.inc(1224): _update_batch_command('768')
#15 /opt/drush-8.x/vendor/drush/drush/includes/command.inc(422): drush_core_updatedb_batch_process('768')
#16 /opt/drush-8.x/vendor/drush/drush/includes/command.inc(231): _drush_invoke_hooks(Array, Array)
#17 /opt/drush-8.x/vendor/drush/drush/includes/command.inc(199): drush_command('768')
#18 /opt/drush-8.x/vendor/drush/drush/lib/Drush/Boot/BaseBoot.php(67): drush_dispatch(Array)
#19 /opt/drush-8.x/vendor/drush/drush/includes/preflight.inc(66): Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#20 /opt/drush-8.x/vendor/drush/drush/drush.php(12): drush_main()
#21 {main}

Next Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'alpha.dev.block_content__field_subscription' doesn't exist: UPDATE
{block_content__field_subscription} SET deleted=:db_update_placeholder_0; Array
(
    [:db_update_placeholder_0] => 1
)
 in /home/giorgos/domain/docroot/core/lib/Drupal/Core/Database/Connection.php:671
Stack trace:
#0 /home/giorgos/domain/docroot/core/lib/Drupal/Core/Database/Connection.php(635): Drupal\Core\Database\Connection->handleQueryException(Object(PDOException), 'UPDATE
{block_c...', Array, Array)
#1 /home/giorgos/domain/docroot/core/lib/Drupal/Core/Database/Driver/mysql/Connection.php(81): Drupal\Core\Database\Connection->query('UPDATE {block_c...', Array, Array)
#2 /home/giorgos/domain/docroot/core/lib/Drupal/Core/Database/Query/Update.php(148): Drupal\Core\Database\Driver\mysql\Connection->query('UPDATE {block_c...', Array, Array)
#3 /home/giorgos/domain/docroot/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php(1444): Drupal\Core\Database\Query\Update->execute()
#4 /home/giorgos/domain/docroot/core/lib/Drupal/Core/Field/FieldStorageDefinitionListener.php(112):
Drupal\Core\Entity\Sql\SqlContentEntityStorage->onFieldStorageDefinitionDelete(Object(Drupal\field\Entity\FieldStorageConfig))
#5 /home/giorgos/domain/docroot/core/lib/Drupal/Core/Entity/EntityManager.php(429):
Drupal\Core\Field\FieldStorageDefinitionListener->onFieldStorageDefinitionDelete(Object(Drupal\field\Entity\FieldStorageConfig))
#6 /home/giorgos/domain/docroot/core/lib/Drupal/Core/Entity/EntityDefinitionUpdateManager.php(242):
Drupal\Core\Entity\EntityManager->onFieldStorageDefinitionDelete(Object(Drupal\field\Entity\FieldStorageConfig))
#7 /home/giorgos/domain/docroot/core/lib/Drupal/Core/Entity/EntityDefinitionUpdateManager.php(116): Drupal\Core\Entity\EntityDefinitionUpdateManager->doFieldUpdate(3, NULL,
Object(Drupal\field\Entity\FieldStorageConfig))
#8 /opt/drush-8.x/vendor/drush/drush/commands/core/drupal/update.inc(250): Drupal\Core\Entity\EntityDefinitionUpdateManager->applyUpdates()
#9 /opt/drush-8.x/vendor/drush/drush/commands/core/drupal/batch.inc(163): drush_update_entity_definitions(Object(DrushBatchContext))
#10 /opt/drush-8.x/vendor/drush/drush/commands/core/drupal/batch.inc(111): _drush_batch_worker()
#11 /opt/drush-8.x/vendor/drush/drush/includes/batch.inc(98): _drush_batch_command('768')
#12 /opt/drush-8.x/vendor/drush/drush/commands/core/drupal/update.inc(174): drush_batch_command('768')
#13 /opt/drush-8.x/vendor/drush/drush/commands/core/core.drush.inc(1224): _update_batch_command('768')
#14 /opt/drush-8.x/vendor/drush/drush/includes/command.inc(422): drush_core_updatedb_batch_process('768')
#15 /opt/drush-8.x/vendor/drush/drush/includes/command.inc(231): _drush_invoke_hooks(Array, Array)
#16 /opt/drush-8.x/vendor/drush/drush/includes/command.inc(199): drush_command('768')
#17 /opt/drush-8.x/vendor/drush/drush/lib/Drush/Boot/BaseBoot.php(67): drush_dispatch(Array)
#18 /opt/drush-8.x/vendor/drush/drush/includes/preflight.inc(66): Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#19 /opt/drush-8.x/vendor/drush/drush/drush.php(12): drush_main()
#20 {main}
Cache rebuild complete.                                                                                                                                                                               [ok]
Finished performing updates.

UPDATE 2: Tried to install the module again but there is configuration still in the table and can't be installed

giorgos@glaptop:~/domain/docroot$ drush en mailchimp_signup, mailchimp_campaign, mailchimp_lists, mailchimp -y
The following extensions will be enabled: mailchimp_signup, mailchimp_campaign, mailchimp_lists, mailchimp
Do you really want to continue? (y/n): y
Drupal\Core\Config\PreExistingConfigException: Configuration objects (mailchimp.settings) provided by mailchimp already exist in active configuration in                                              [error]
/home/giorgos/domain/docroot/core/lib/Drupal/Core/Config/PreExistingConfigException.php:65
Stack trace:
#0 /home/giorgos/domain/docroot/core/lib/Drupal/Core/Config/ConfigInstaller.php(471): Drupal\Core\Config\PreExistingConfigException::create('mailchimp', Array)
#1 /home/giorgos/domain/docroot/core/lib/Drupal/Core/ProxyClass/Config/ConfigInstaller.php(132): Drupal\Core\Config\ConfigInstaller->checkConfigurationToInstall('module',
'mailchimp')
#2 /home/giorgos/domain/docroot/core/lib/Drupal/Core/Extension/ModuleInstaller.php(141): Drupal\Core\ProxyClass\Config\ConfigInstaller->checkConfigurationToInstall('module',
'mailchimp')
#3 /home/giorgos/domain/docroot/core/lib/Drupal/Core/ProxyClass/Extension/ModuleInstaller.php(83): Drupal\Core\Extension\ModuleInstaller->install(Array, true)
#4 /opt/drush-8.x/vendor/drush/drush/commands/core/drupal/environment.inc(131): Drupal\Core\ProxyClass\Extension\ModuleInstaller->install(Array, true)
#5 /opt/drush-8.x/vendor/drush/drush/commands/core/drupal/environment.inc(198): drush_module_install(Array)
#6 /opt/drush-8.x/vendor/drush/drush/commands/pm/pm.drush.inc(1167): drush_module_enable(Array)
#7 /opt/drush-8.x/vendor/drush/drush/includes/command.inc(422): drush_pm_enable('mailchimp_signu...', 'mailchimp_campa...', 'mailchimp_lists...', 'mailchimp')
#8 /opt/drush-8.x/vendor/drush/drush/includes/command.inc(231): _drush_invoke_hooks(Array, Array)
#9 /opt/drush-8.x/vendor/drush/drush/includes/command.inc(199): drush_command('mailchimp_signu...', 'mailchimp_campa...', 'mailchimp_lists...', 'mailchimp')
#10 /opt/drush-8.x/vendor/drush/drush/lib/Drush/Boot/BaseBoot.php(67): drush_dispatch(Array)
#11 /opt/drush-8.x/vendor/drush/drush/includes/preflight.inc(66): Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#12 /opt/drush-8.x/vendor/drush/drush/drush.php(12): drush_main()
#13 {main}

marked as duplicate by kenorb, leymannx, Alfred Armstrong, DRUPWAY, Yusef Dec 9 '18 at 15:39

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

3

You have to run the drush command entity updates to correct this.

https://drushcommands.com/drush-8x/core/entity-updates/

drush entity-updates

Edit: sounds like the Mailchimp module potentially broke your database. I would cross report this to the Mailchimp module issue queue.

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