PHP 5.5.30
Drupal 8.1.1

Whe adding the workflow:

The website encountered an unexpected error. Please try again later.

Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException: The "workflow_type" entity type did not specify a "add" form class. in Drupal\Core\Entity\EntityTypeManager->getFormObject() (line 176 of core/lib/Drupal/Core/Entity/EntityTypeManager.php).
Drupal\Core\Entity\EntityManager->getFormObject('workflow_type', 'add') (Line: 69)
Drupal\Core\Entity\HtmlEntityFormController->getFormObject(Object, 'workflow_type.add') (Line: 59)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 574)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
call_user_func_array(Object, Array) (Line: 139)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 62)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 98)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 77)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 50)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 628)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

Comments

Nor4a created an issue. See original summary.

johnv’s picture

Status: Active » Postponed (maintainer needs more info)

I cannot reproduce this. Which version are you using? ITMT, D8-version 8.2.x is release. Please try with latest releases of Drupal core and Workflow.

johnv’s picture

Title: Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException: The "workflow_type" entity type did not specify a "add" form class. in Drupal\Core\Entity\EntityTypeManager->getFormObject() (line 176 of core/lib/Drupal/Core/Entity/EntityTypeManager.php » Error: The "workflow_type" entity type did not specify a "add" form class.

Shorter title.

uceap-web’s picture

same error, I was unable to create a new workflow.

PHP 5.6
Drupal core 8.2.3
Workflow 8.x-1.0-beta6

error only appearing when working in a local copy of the site. Live server worked fine.

after setting xdebug.max_nesting_level=256 in php.ini, problem was solved!

johnv’s picture

Status: Postponed (maintainer needs more info) » Active
heavy_engineer’s picture

I experienced this using https://github.com/geerlingguy/drupal-vm with default settings. I installed the module using composer, enabled it with drush, then got the same error. I didn't have xdebug enabled but increased the memory available to php-fpm and it has cured the issue for me. Assuming the xdebug change reduced memory usage then i think this is the likely problem.

uceap-web’s picture

I also got it to work by restarting apache on my local dev environment and clearing cache.

johnv’s picture

This happens when you have Workflow module enabled, but workflow_ui module disabled.

The following patch moves the WorkflowForm from the workflow_ui module to the workflow module.

  • johnv committed 6ebcf01 on 8.x-1.x
    Issue #2734543: Error: The 'workflow_type' entity type did not specify a...
johnv’s picture

Version: 8.x-1.x-dev » 8.x-1.0-beta6
Status: Active » Fixed

  • johnv committed 3167344 on 8.x-1.x
    Issue #2734543 by johnv: Error: The 'workflow_type' entity type did not...
johnv’s picture

Status: Fixed » Closed (fixed)

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