After upgrading core to 8.2.0-rc1 I get the following error:

TypeError: Argument 2 passed to Drupal\workbench_moderation\ParamConverter\EntityRevisionConverter::__construct() must implement interface Drupal\workbench_moderation\ModerationInformationInterface, none given, called in /.../core/lib/Drupal/Component/DependencyInjection/Container.php on line 268 in Drupal\workbench_moderation\ParamConverter\EntityRevisionConverter->__construct() (line 33 of modules/contrib/workbench_moderation/src/ParamConverter/EntityRevisionConverter.php).

I noticed in workbench_moderation.services.yml arguments is defined twice.

  paramconverter.latest_revision:
    class: Drupal\workbench_moderation\ParamConverter\EntityRevisionConverter
    arguments: ['@entity.manager', '@workbench_moderation.moderation_information']
    tags:
      - { name: paramconverter, priority: 5 }
    arguments: ['@entity.manager']

Is this intentional? It seems to be a mistake.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mstrelan created an issue. See original summary.

mstrelan’s picture

Status: Needs review » Needs work

The last submitted patch, 2: 2796871-1-workbench_moderation-paramconvertor.patch, failed testing.

The last submitted patch, 2: 2796871-1-workbench_moderation-paramconvertor.patch, failed testing.

hass’s picture

This module is now in core 8.2.0

mstrelan’s picture

Marked as experimental and with no upgrade path. Surely until then we should be able to keep using this module and keep core up to date.

notmike’s picture

I am getting this same error when trying to install Drupal 8.1.9 under the Acquia Lightning distribution, version 8.1.04. This is the post that comes up when I search for the error.

It has been causing my local build to fail.

Argument 2 passed to Drupal\workbench_moderation\ParamConverter\EntityRevisionConverter::__construct() must implement interface Drupal\workbench_moderation\ModerationInformationInterface, none given, called in      [error]
/.../core/lib/Drupal/Component/DependencyInjection/Container.php on line 268 and defined EntityRevisionConverter.php:33
naveenvalecha’s picture

Status: Needs work » Postponed (maintainer needs more info)

@notmike,
I'm not able to reproduce it with 8.1.9 Please provides the steps to reproduce it with 8.1.9 see https://www.drupal.org/contributor-tasks/add-steps-to-reproduce#steps

notmike’s picture

@naveenvalecha
When we ripped out Acquia BLT 8.4.0 (Build and Launch Tool) from our composer.json file and just went with straight Lightning 1.04 (with Drupal 8.1.9), everything built normally.

I am not sure why BLT was causing that error. It seems unrelated. For now, I guess we can ignore what I reported.

mstrelan’s picture

Status: Postponed (maintainer needs more info) » Needs review

@naveenvalecha the original report is for 8.2.0-rc1 which is when it first appeared.

Regardless of how to reproduce it, it doesn't make sense to me why argumentsis duplicated for paramconverter.latest_revision in workbench_moderation.services.yml?

Steps to reproduce:

  1. Install Drupal 8.2.0-rc1
  2. Enabled Workbench Moderation
naveenvalecha’s picture

the original report is for 8.2.0-rc1 which is when it first appeared.

Cool, It makes sense now, Good news, workbench moderation(content moderation) is now in core!!!
We are planning to provide a migrate path from workbench(8.1.) to 8.2 content moderation Track the status of the migrate path here https://www.drupal.org/node/2766125

mstrelan’s picture

I know it's in core but there is no migrate path as yet. As it stands an existing site on 8.1.x can't upgrade to 8.2.x if WBM is installed.

timmillwood’s picture

Status: Needs review » Reviewed & tested by the community

Adding commit credit for josephdpurcell, phenaproxima, then closing #2780691: Incorrect EntityRevision paramconverter service definition causes a fatal error as duplicate.

  • timmillwood committed 4128fc1 on 8.x-1.x authored by mstrelan
    Issue #2796871 by mstrelan, josephdpurcell, phenaproxima: TypeError:...
timmillwood’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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