Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When I try to run the lightning update that installs wbm2cm, I get the error:
"The following reasons prevent the modules from being uninstalled: There is data for the field moderation_state on entity type Content"
I also get the error when I uninstall workbench_moderation using "drush pmu workbench_moderation. I have patched workbench moderation's latest dev release as described in https://www.drupal.org/project/workbench_moderation/issues/2627012 #47.
Here is the error
>drupal update:lightning since=2.2.3 --no-interaction
Executing all updates since version since=2.2.3.
Lightning Media 2.1.8
Media Image 2.1.8
Lightning Workflow 2.1.8
Installing wbm2cm.
Saving existing moderation states...
Removing moderation states. This is necessary in order to uninstall Workbench Moderation.
Installing Content Moderation...
[Drupal\Core\Extension\ModuleUninstallValidatorException]
The following reasons prevent the modules from being uninstalled: There is data for the field moderation_state on entity type Content, <a href="/admin/modules/uninstall/workbench_moder
ation">Remove field values</a>: moderation_state on entity type Content.
update:lightning [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-e|--env [ENV]] [--root [ROOT]] [--debug] [--learning] [-c|--generate-chain] [-i|--generate-inline] [-d|--generate-doc] [-t|--target [TARGET]] [-l|--uri URI] [-y|--yes] [--] <command> <since>
Comments
Comment #2
balsamaSeveral users have reported being unable to uninstall Workbench Moderation. @brathbone ended up tracing his problem to a seemingly unrelated module - although I can't remember what it was now. Maybe try to ping him in the #lightning Slack channel when he comes online.
I also found this tangentially related issue #2282119: Make the Entity Field API handle field purging. It might help if you apply the patch from that issue.
Comment #3
ARUN AK CreditAttribution: ARUN AK commentedSame here. @captaindav, you got this resolved?
Because of this content_moderation and workbench_moderation conflict I'm facing other issues too:
Comment #4
phenaproximaPlease do not use the Critical priority for anything except data loss and security issues.
Comment #5
adamschan CreditAttribution: adamschan commentedGot the exact same issue after applying #34 from https://www.drupal.org/project/workbench_moderation/issues/2627012, still no clue.
Comment #6
ARUN AK CreditAttribution: ARUN AK commentedThe patch mentioned here helped me to uninstall workbench module. I followed:
After deleted field data I was able to uninstall workbench_moderation module.
Comment #7
ellioseven CreditAttribution: ellioseven as a volunteer commentedI am following the update instructions here: https://github.com/acquia/lightning/releases/tag/2.2.4
The Drupal Console instructions don't seem to work, so I have to run the updates manually.
When I run
I get the following error.
I have tried the patch mentioned in #6. Although it did allow me to uninstall module manually, however when running the migration I still hit the same issue.
Has anyone else managed to fix this?
Comment #8
Tomotsugu Kaneko CreditAttribution: Tomotsugu Kaneko commentedHi, @ellioseven I had same error as yours.
In my case fix with:
1. goto `/admin/content/scheduled_update`
2. remove all schedules.
3. run `drush wbm2cm-migrate` agin.
Comment #9
florianmuellerCHHaving the same issue here after updating to 2.26. We have the field "moderation_state" on some content types to set the moderation state of a content (page or so). This field should be migrated to content_moderation in my opinion, however it's not doing this:
Comment #10
adamschan CreditAttribution: adamschan commentedSee if the workaround at https://www.drupal.org/project/workbench_moderation/issues/2627012 can help.
Comment #11
phenaproximaComment #12
Wim LeersComment #13
ramalingam07 CreditAttribution: ramalingam07 commentedI am getting below the error while run `drush wbm2cm-restore` - Drupal 8.5.15
`in Drupal\Core\Entity\Sql\SqlContentEntityStorage->saveRevision() (line 1101 of
/var/www/cgicom/docroot/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).
Drupal\Core\Entity\EntityStorageException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'revision_default' in 'field list': INSERT INTO [error]
{content_moderation_state_revision} (id, langcode, revision_default) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2);
Array
(
[:db_insert_placeholder_0] => 53
[:db_insert_placeholder_1] => en
[:db_insert_placeholder_2] => 1
)`
Anyone can help ?