After upgradation of old drupal site (version - 8.2.8) to new site (version - 8.4.3) , on node edit page of each tab, latest version tab is appearing two times. In old drupal site the workbench moderation version was 8.x-1.1 and in new site the version is 8.x-1.3.

CommentFileSizeAuthor
latest_vesion_issue.png55.71 KBDebasish147
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Debasish147 created an issue. See original summary.

Debasish147’s picture

Issue summary: View changes
bharanikumariyerphp’s picture

Any luck for this issue

ARUN AK’s picture

Priority: Major » Critical

Same here. Any update on this?

Debasish147’s picture

Both content_moderation (core) and workbench_moderation (contrib) generates Latest version tabs. So i unset the workbench_moderation Latest version tab and retaining the core one as follows and this solves the issue.

function modulename_local_tasks_alter(&$local_tasks) {
foreach ($local_tasks as $key => $value) {
if ($key == 'moderaion_state.entities:node.latest_version_tab') {
unset($local_tasks['moderaion_state.entities:node.latest_version_tab']);
}
}
}

Debasish147’s picture

Status: Active » Needs review
adamschan’s picture

Same here, anyone can provide a patch please?

timmillwood’s picture

Why do you have both modules installed? Either use one or the other!

If you need to uninstall Workbench Moderation, upgrade to Drupal 8.5.0 and it will be possible to uninstall.

adamschan’s picture

@timmillwood, I'm using Acquia lightning distribution and the workbench_moderation is by default installed. Upgrading to 8.4x will also enable content_moderation and therefore having both installed.

Upgrading to 8.5 create some other more complicated issues. ><

timmillwood’s picture

@adamschan - I thought Acquia had sorted this!

phenaproxima’s picture

I'm using Acquia lightning distribution and the workbench_moderation is by default installed. Upgrading to 8.4x will also enable content_moderation and therefore having both installed.

As of version 2.2.4, Lightning enables Content Moderation by default, not Workbench Moderation. If you are upgrading from a version older than that, Lightning provides an update path, which is explained in the update instructions, and which uninstalls Workbench Moderation as part of that process.

justclint’s picture

We also just noticed this. It didnt even occur to me to check if workbench_moderation was still enabled after the lightning update until I saw this post but after checking it appears the moderation migration in the lightning update did not uninstall workbench moderation.

I tried to uninstall it manually but getting a known error as discussed here

drush pmu workbench_moderation -y
The following extensions will be uninstalled: workbench_moderation
Do you really want to continue? (y/n): y
exception 'Drupal\Core\Extension\ModuleUninstallValidatorException' with message 'The following reasons prevent the modules from being uninstalled: There is data for the field moderation_state [error]
on entity type Content' in /var/www/redacted/docroot/core/lib/Drupal/Core/Extension/ModuleInstaller.php:365
Stack trace:
#0 /var/www/redacted/docroot/core/lib/Drupal/Core/ProxyClass/Extension/ModuleInstaller.php(91): Drupal\Core\Extension\ModuleInstaller->uninstall(Array, true)
#1 /var/www/redacted/vendor/drush/drush/commands/core/drupal/environment.inc(227): Drupal\Core\ProxyClass\Extension\ModuleInstaller->uninstall(Array)
#2 /var/www/redacted/vendor/drush/drush/commands/core/drupal/pm_8.inc(79): drush_module_uninstall(Array)
#3 /var/www/redacted/vendor/drush/drush/commands/pm/pm.drush.inc(1250): _drush_pm_uninstall(Array)
#4 [internal function]: drush_pm_uninstall('workbench_moder...')
#5 /var/www/redacted/vendor/drush/drush/includes/command.inc(422): call_user_func_array('drush_pm_uninst...', Array)
#6 /var/www/redacted/vendor/drush/drush/includes/command.inc(231): _drush_invoke_hooks(Array, Array)
#7 [internal function]: drush_command('workbench_moder...')
#8 /var/www/redacted/vendor/drush/drush/includes/command.inc(199): call_user_func_array('drush_command', Array)
#9 /var/www/redacted/vendor/drush/drush/lib/Drush/Boot/BaseBoot.php(67): drush_dispatch(Array)
#10 /var/www/redacted/vendor/drush/drush/includes/preflight.inc(66): Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#11 /var/www/redacted/vendor/drush/drush/drush.php(12): drush_main()
#12 {main}

We followed the update instructions here and used the 'console' command vs. the manual method. I was able to go back and find the update in my terminal and the only output from the update was the following.

drupal update:lightning since=2.2.3
Executing all updates since version since=2.2.3.
Lightning Media 2.1.8
Media Image 2.1.8
Lightning Workflow 2.1.8

Not sure if there should of been more but I can confirm our workbench_moderation was not uninstalled by the lightning update but apparently also can not uninstall manually either.

ARUN AK’s picture

Unistalling workbench_moderation module will resolve this issue. Below are the steps which I followed:

Patch mentioned here helped me to uninstall workbench module. I followed:

  1. Applied the patch mentioned in comment #34 here.
  2. Cleared Drupal Cache.
  3. Deleted filed data through this page /admin/modules/uninstall/workbench_moderation
  4. Cleared Drupal Cache again
  5. Ran cron jobs
  6. Uninstalled workbench_moderation module

After deleted field data I was able to uninstall workbench_moderation module.

justclint’s picture

Thanks @Arun! That worked great.

Debasish147’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.