Hello,
When we have enable the workflow_ui module it casing the following error

Message : Recoverable fatal error: Argument 1 passed to Drupal\workflow\Entity\WorkflowManager::isWorkflowEntityType() must be an instance
of Drupal\workflow\Entity\string, string given, called in /var/www/html/uatpshc/modules/workflow/workflow.views.inc on line 38
and defined in Drupal\workflow\Entity\WorkflowManager::isWorkflowEntityType() (line 458 of
/var/www/html/uatpshc/modules/workflow/src/Entity/WorkflowManager.php) #0
/var/www/html/uatpshc/core/includes/bootstrap.inc(552): _drupal_error_handler_real(4096, 'Argument 1 pass...',
'/var/www/html/u...', 458, Array)
#1 /var/www/html/uatpshc/modules/workflow/src/Entity/WorkflowManager.php(458): _drupal_error_handler(4096, 'Argument 1 pass...',
'/var/www/html/u...', 458, Array)
#2 /var/www/html/uatpshc/modules/workflow/workflow.views.inc(38):
Drupal\workflow\Entity\WorkflowManager::isWorkflowEntityType('block')
#3 /var/www/html/uatpshc/core/lib/Drupal/Core/Extension/ModuleHandler.php(501): workflow_views_data_alter(Array, NULL, NULL)
#4 /var/www/html/uatpshc/core/modules/views/src/ViewsData.php(254): Drupal\Core\Extension\ModuleHandler->alter('views_data',
Array)
#5 /var/www/html/uatpshc/core/modules/views/src/ViewsData.php(162): Drupal\views\ViewsData->getData()
#6 /var/www/html/uatpshc/core/modules/views/src/Plugin/Derivative/ViewsEntityRow.php(91):
Drupal\views\ViewsData->get('block_content')
#7 /var/www/html/uatpshc/core/lib/Drupal/Component/Plugin/Discovery/DerivativeDiscoveryDecorator.php(101):
Drupal\views\Plugin\Derivative\ViewsEntityRow->getDerivativeDefinitions(Array)
#8 /var/www/html/uatpshc/core/lib/Drupal/Component/Plugin/Discovery/DerivativeDiscoveryDecorator.php(87):
Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator->getDerivatives(Array)
#9 /var/www/html/uatpshc/core/lib/Drupal/Core/Plugin/DefaultPluginManager.php(283):
Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator->getDefinitions()
#10 /var/www/html/uatpshc/core/lib/Drupal/Core/Plugin/DefaultPluginManager.php(174):
Drupal\Core\Plugin\DefaultPluginManager->findDefinitions()
#11 /var/www/html/uatpshc/core/modules/views/views.module(143): Drupal\Core\Plugin\DefaultPluginManager->getDefinitions()
#12 /var/www/html/uatpshc/core/lib/Drupal/Core/Theme/Registry.php(446): views_theme(Array, 'module', 'views',
'core/modules/vi...')
#13 /var/www/html/uatpshc/core/lib/Drupal/Core/Theme/Registry.php(333): Drupal\Core\Theme\Registry->processExtension(Array,
'views', 'module', 'views', 'core/modules/vi...')
#14 /var/www/html/uatpshc/core/lib/Drupal/Core/Theme/Registry.php(232): Drupal\Core\Theme\Registry->build()
#15 /var/www/html/uatpshc/core/lib/Drupal/Core/Utility/ThemeRegistry.php(86): Drupal\Core\Theme\Registry->get()
#16 /var/www/html/uatpshc/core/lib/Drupal/Core/Utility/ThemeRegistry.php(67):
Drupal\Core\Utility\ThemeRegistry->initializeRegistry()
#17 /var/www/html/uatpshc/core/lib/Drupal/Core/Theme/Registry.php(252):
Drupal\Core\Utility\ThemeRegistry->__construct('theme_registry:...', Object(Drupal\Core\Cache\DatabaseBackend),
Object(Drupal\Core\ProxyClass\Lock\DatabaseLockBackend), Array, true)
#18 /var/www/html/uatpshc/core/lib/Drupal/Core/Theme/ThemeManager.php(142): Drupal\Core\Theme\Registry->getRuntime()
#19 /var/www/html/uatpshc/core/lib/Drupal/Core/Render/Renderer.php(435): Drupal\Core\Theme\ThemeManager->render(Array, Array)
#20 /var/www/html/uatpshc/core/lib/Drupal/Core/Render/Renderer.php(195): Drupal\Core\Render\Renderer->doRender(Array, false)
#21 /var/www/html/uatpshc/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(226):
Drupal\Core\Render\Renderer->render(Array, false)
#22 /var/www/html/uatpshc/core/lib/Drupal/Core/Render/Renderer.php(574):
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}()
#23 /var/www/html/uatpshc/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(227):
Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
#24 /var/www/html/uatpshc/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(117):
Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object(Symfony\Component\HttpFoundation\Request),
Object(Drupal\Core\Routing\CurrentRouteMatch))
#25 /var/www/html/uatpshc/core/lib/Drupal/Core/EventSubscriber/MainContentViewSubscriber.php(90):
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object(Symfony\Component\HttpFoundation\Request),
Object(Drupal\Core\Routing\CurrentRouteMatch))
#26 /var/www/html/uatpshc/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(111):
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object(Symfony\Component\HttpKernel\Event\GetResponseFo
rControllerResultEvent), 'kernel.view', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
#27 /var/www/html/uatpshc/vendor/symfony/http-kernel/HttpKernel.php(149):
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view',
Object(Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent))
#28 /var/www/html/uatpshc/vendor/symfony/http-kernel/HttpKernel.php(64):
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#29 /var/www/html/uatpshc/core/lib/Drupal/Core/StackMiddleware/Session.php(57):
Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#30 /var/www/html/uatpshc/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47):
Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#31 /var/www/html/uatpshc/core/modules/page_cache/src/StackMiddleware/PageCache.php(99):
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#32 /var/www/html/uatpshc/core/modules/page_cache/src/StackMiddleware/PageCache.php(78):
Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#33 /var/www/html/uatpshc/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47):
Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#34 /var/www/html/uatpshc/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(50):
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#35 /var/www/html/uatpshc/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23):
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#36 /var/www/html/uatpshc/core/lib/Drupal/Core/DrupalKernel.php(656):
Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#37 /var/www/html/uatpshc/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#38 {main}.

Comments

vipul tulse created an issue. See original summary.

vipul tulse’s picture

Title: Workflow module casing The website encountered an unexpected error with drupal version 8.4.3 » Workflow module causing The website encountered an unexpected error with drupal version 8.4.3
vipul tulse’s picture

This error is coming because of the Drupal\workflow\Entity\WorkflowManager::isWorkflowEntityType() must be an instance
of Drupal\workflow\Entity\string and String type defined while declaring the Interface and defining.

public static function isWorkflowEntityType(string $entity_type_id) under the file "workflow/src/Entity/WorkflowManagerInterface.php"

--From above code removed the string type

In file "workflow/src/Entity/WorkflowManager.php" did same removed the string from defination.

vipul tulse’s picture

Status: Active » Needs work
vipul tulse’s picture

Status: Needs work » Needs review
StatusFileSize
new1.66 KB
johnv’s picture

Title: Workflow module causing The website encountered an unexpected error with drupal version 8.4.3 » Error: Argument 1 passed to WorkflowManager::isWorkflowEntityType() must be an instance of Drupal\workflow\Entity\string

  • johnv committed 92b3e0b on 8.x-1.x authored by vipul tulse
    Issue #2934060 by vipul tulse: Error: Argument 1 passed to...
johnv’s picture

Version: 8.x-1.x-dev » 8.x-1.0
Status: Needs review » Fixed

Thanks. committed.

Status: Fixed » Closed (fixed)

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