Closed (fixed)
Project:
Workflow
Version:
8.x-1.0-beta6
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
31 Oct 2016 at 08:44 UTC
Updated:
20 Feb 2024 at 16:07 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
johnvThis seems related: #2629864: Error: No link template 'edit-form' found for the 'workflow_config_transition'when deleting a Workflow and pathauto enabled.
There is no edit form in Workflow module.
Comment #3
johnvComment #4
johnvPlease try the latest dev version. The related issue 2697031 is committed.
Comment #5
manuel.adanRe-open with detailed steps to reproduce:
profile: standard, language: English
will also enable interface translation and language modules
at /admin/config/workflow/workflow/add with default configuration
at /admin/config/workflow/workflow/test/states
at /admin/config/workflow/workflow/test/transition_roles
at /admin/structure/types/manage/page/fields/add-field
at /admin/modules/uninstall
you'll get "The website encountered an unexpected error. Please try again later."
Message on logs:
Backtrace:
Error: Call to a member function getPath() on null in /var/www/html/core/modules/config_translation/src/ConfigNamesMapper.php on line 233 #0 /var/www/html/core/modules/config_translation/src/Routing/RouteSubscriber.php(39): Drupal\config_translation\ConfigNamesMapper->getOverviewRoute() #1 /var/www/html/core/lib/Drupal/Core/Routing/RouteSubscriberBase.php(37): Drupal\config_translation\Routing\RouteSubscriber->alterRoutes(Object(Symfony\Component\Routing\RouteCollection)) #2 /var/www/html/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(111): Drupal\Core\Routing\RouteSubscriberBase->onAlterRoutes(Object(Drupal\Core\Routing\RouteBuildEvent), 'routing.route_a...', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher)) #3 /var/www/html/core/lib/Drupal/Core/Routing/RouteBuilder.php(184): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('routing.route_a...', Object(Drupal\Core\Routing\RouteBuildEvent)) #4 /var/www/html/core/lib/Drupal/Core/ProxyClass/Routing/RouteBuilder.php(83): Drupal\Core\Routing\RouteBuilder->rebuild() #5 /var/www/html/core/lib/Drupal/Core/Extension/ModuleInstaller.php(473): Drupal\Core\ProxyClass\Routing\RouteBuilder->rebuild() #6 /var/www/html/core/lib/Drupal/Core/ProxyClass/Extension/ModuleInstaller.php(91): Drupal\Core\Extension\ModuleInstaller->uninstall(Array, true) #7 /var/www/html/core/modules/system/src/Form/ModulesUninstallConfirmForm.php(160): Drupal\Core\ProxyClass\Extension\ModuleInstaller->uninstall(Array) #8 [internal function]: Drupal\system\Form\ModulesUninstallConfirmForm->submitForm(Array, Object(Drupal\Core\Form\FormState)) #9 /var/www/html/core/lib/Drupal/Core/Form/FormSubmitter.php(111): call_user_func_array(Array, Array) #10 /var/www/html/core/lib/Drupal/Core/Form/FormSubmitter.php(51): Drupal\Core\Form\FormSubmitter->executeSubmitHandlers(Array, Object(Drupal\Core\Form\FormState)) #11 /var/www/html/core/lib/Drupal/Core/Form/FormBuilder.php(585): Drupal\Core\Form\FormSubmitter->doSubmitForm(Array, Object(Drupal\Core\Form\FormState)) #12 /var/www/html/core/lib/Drupal/Core/Form/FormBuilder.php(314): Drupal\Core\Form\FormBuilder->processForm('system_modules_...', Array, Object(Drupal\Core\Form\FormState)) #13 /var/www/html/core/lib/Drupal/Core/Controller/FormController.php(74): Drupal\Core\Form\FormBuilder->buildForm('system_modules_...', Object(Drupal\Core\Form\FormState)) #14 [internal function]: Drupal\Core\Controller\FormController->getContentResult(Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\RouteMatch)) #15 /var/www/html/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array) #16 /var/www/html/core/lib/Drupal/Core/Render/Renderer.php(574): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() #17 /var/www/html/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure)) #18 /var/www/html/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) #19 [internal function]: Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() #20 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(139): call_user_func_array(Object(Closure), Array) #21 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(62): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1) #22 /var/www/html/core/lib/Drupal/Core/StackMiddleware/Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #23 /var/www/html/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #24 /var/www/html/core/modules/page_cache/src/StackMiddleware/PageCache.php(99): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #25 /var/www/html/core/modules/page_cache/src/StackMiddleware/PageCache.php(78): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true) #26 /var/www/html/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #27 /var/www/html/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(50): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #28 /var/www/html/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\ egotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #29 /var/www/html/core/lib/Drupal/Core/DrupalKernel.php(652): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #30 /var/www/html/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))This happen on every installation operation where workflow and related modules are involved, like configuration import in staging.
Comment #6
manuel.adanTested version beta6
Comment #7
zyyz commentedYes, same error. It is not possible to enable this module (1.0-beta6) while configuration translation is enabled.
Comment #8
prajaankit commentedyes same issue with drupal8.2.6
Do you really want to continue? (y/n): y
Error: Call to a member function getPath() on null in /opt/init/dev3/versions/in itial/CMS-D8/core/modules/config_translation/src/ConfigNamesMapper.php on line 2 33 #0 /opt/init/dev3/versions/initial/CMS-D8/core/modules/config_translation/src /Routing/RouteSubscriber.php(39): Drupal\config_translation\ConfigNamesMapper->g etOverviewRoute()
#1 /opt/init/dev3/versions/initial/CMS-D8/core/lib/Drupal/Core/Routing/RouteSubs criberBase.php(37): Drupal\config_translation\Routing\RouteSubscriber->alterRout es(Object(Symfony\Component\Routing\RouteCollection))
#2 /opt/init/dev3/versions/initial/CMS-D8/core/lib/Drupal/Component/EventDispatc her/ContainerAwareEventDispatcher.php(111): Drupal\Core\Routing\RouteSubscriberB ase->onAlterRoutes(Object(Drupal\Core\Routing\RouteBuildEvent), 'routing.route_a ...', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
#3 /opt/init/dev3/versions/initial/CMS-D8/core/lib/Drupal/Core/Routing/RouteBuil der.php(184): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->di spatch('routing.route_a...', Object(Drupal\Core\Routing\RouteBuildEvent))
#4 /opt/init/dev3/versions/initial/CMS-D8/core/lib/Drupal/Core/ProxyClass/Routin g/RouteBuilder.php(83): Drupal\Core\Routing\RouteBuilder->rebuild()
#5 /opt/init/dev3/versions/initial/CMS-D8/core/lib/Drupal/Core/Extension/ModuleI nstaller.php(302): Drupal\Core\ProxyClass\Routing\RouteBuilder->rebuild()
#6 /opt/init/dev3/versions/initial/CMS-D8/core/lib/Drupal/Core/ProxyClass/Extens ion/ModuleInstaller.php(83): Drupal\Core\Extension\ModuleInstaller->install(Arra y, true)
#7 /root/.composer/vendor/drush/drush/commands/core/drupal/environment.inc(131): Drupal\Core\ProxyClass\Extension\ModuleInstaller->install(Array, true)
#8 /root/.composer/vendor/drush/drush/commands/core/drupal/environment.inc(198): drush_module_install(Array)
#9 /root/.composer/vendor/drush/drush/commands/pm/pm.drush.inc(1167): drush_modu le_enable(Array)
#10 /root/.composer/vendor/drush/drush/includes/command.inc(422): drush_pm_enabl e('workflow')
#11 /root/.composer/vendor/drush/drush/includes/command.inc(231): _drush_invoke_ hooks(Array, Array)
#12 /root/.composer/vendor/drush/drush/includes/command.inc(199): drush_command( 'workflow')
#13 /root/.composer/vendor/drush/drush/lib/Drush/Boot/BaseBoot.php(67): drush_di spatch(Array)
#14 /root/.composer/vendor/drush/drush/includes/preflight.inc(66): Drush\Boot\Ba seBoot->bootstrap_and_dispatch()
#15 /root/.composer/vendor/drush/drush/drush.php(12): drush_main()
#16 {main}
Error: Call to a member function getPath() on null in Drupal\config_translation\ ConfigNamesMapper->getOverviewRoute() (line 233 of /opt/init/dev3/versions/initi al/CMS-D8/core/modules/config_translation/src/ConfigNamesMapper.php).
Drush command terminated abnormally due to an unrecoverable error. [error]
any patch or any other way to install this module
Comment #9
artaphis commentedWorkflow Transition entity depends on "entity.workflow_type.edit_form" route defined in Workflow UI.
Comment #10
johnvThanks, artaphis and manuel.adan ,
already in #5 I could see that Workflow apparently depends upon Workflow UI. That is not the purpose of having submodules. Workflow should be active in Production, and Workflow UI should only be necessary in Staging.
This is because in D6/D7, the Workflow module is broken down in submodules, to lower the overhead per page load.
Adding the dependency as in #9 is not the way to go.
I could move some code from Worklfow UI to Workflow.
And perhaps, the architecture of D8 makes the spilt of code in submodules not necessary.
Question to the public:
- Should I remove the Workflow UI submodule, and move all code into the Workflow Main module? Or would it be sufficient/better/leaner to move only the necessary code?
Comment #11
manuel.adanFor me, the main problem here is that this bug breaks the configuration import. This forced me to get a temporary solution, patching the core config_translation module as follows:
*not as an attachment because this is not a patch for the workflow module.
Comment #12
johnvManuel, so you do not have the problem if workflow UI is enabled?
Comment #13
manuel.adan@johnv The error occurred while importing settings using drush on a new deployment. Workflow_ui was enabled, but I suspect the workflow module was installed by the config manager before the workflow_ui to satisfy some dependencies.
Comment #14
johnvThis should be solved by adding all functionality from workflow_ui to workflow.
Comment #15
johnv@manuel.adan ,
can you add this dependency to workflow_ui also at another level, e.g., your installation profile?
[EDIT] Ah, clearly, you only need workflow_ui module in development, not in other systems.
Comment #16
johnvComment #17
manuel.adanAnother simpler scenario in which this bug occurs. Download and enable workflow_ui module for the first time. The main workflow module will be requested as a dependency. Working with drush, Drupal 8.3.7 & workflow 8.x-dev (8.x-1.0-beta6+29-dev):
Comment #18
zseguin commentedI updated the patch against latest dev.
Comment #19
johnvIn #2734543: Error: The "workflow_type" entity type did not specify a "add" form class. some code was moved from workflow_ui to workflow module. That should do the trick.
The proposed patch means workflow_ui must Always be enabled. that is not the purpose of having submodules.
Please download latest dev version and try again.
Comment #20
manuel.adanI can confirm that the bug, as described in #17, does not exist in latest -dev (tested on 8.4.0 core):
Thank's
Comment #21
johnvThanks for the fast response. Please download dev again, since i discovered and fixed an error in workflow_ui in #2796705: Route "entity.workflow_type.canonical" error prevents editing Workflow
Comment #23
johnvComment #24
johnv