For those landing here looking for an expedient solution, you can run:
drush ev "_scheduler_content_moderation_integration_add_fields()"
And then uninstall the module via the admin UI.
- 🇮🇳India newswatch Delhi/Bangalore
I am unable to uninstall this module.
The error message:
Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'publish_state' in 'where clause': SELECT 1 AS "expression" FROM "media_field_data" "t" WHERE "publish_state" IS NOT NULL LIMIT 1 OFFSET 0; Array ( ) in Drupal\Core\Entity\Sql\SqlContentEntityStorage->countFieldData() (line 1794 of /home/sitename/public_html/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).
- 🇺🇸United States loopy1492
We were getting the following:
Mismatched entity and/or field definitions
The following changes were detected in the entity type and field definitions.
Taxonomy term
The Publish state field needs to be installed.
The Unpublish state field needs to be installed.We attempted to remediate by simply uninstalling and reinstalling the module and exporting the config, but we received the error in the OP. Instead, we had to do the following:
drush php:eval "require_once 'modules/contrib/scheduler_content_moderation_integration/scheduler_content_moderation_integration.install';" drush php:eval "require_once 'modules/contrib/scheduler_content_moderation_integration/scheduler_content_moderation_integration.install'; scheduler_content_moderation_integration_update_9001();" drush php:eval "require_once 'modules/contrib/scheduler_content_moderation_integration/scheduler_content_moderation_integration.install'; scheduler_content_moderation_integration_update_9002();" drush php:eval "require_once 'modules/contrib/scheduler_content_moderation_integration/scheduler_content_moderation_integration.install'; scheduler_content_moderation_integration_update_9003();" drush cex -y
Then commit the new configuration.