We have the following error.

Workflow name is example.

We have 3 states.
Creation
Draft
Published

Current state: "Draft"
Target state: "Published"

Schedule: "Schedule for state change

At: Current datetime.

And we execute Cron.

But state is not changed.

We find 3 errors in /admin/reports/dblog.

1. Type: workflow
Message: Scheduled Transition is discarded, since Entity has state ID example_published, instead of expected ID example_draft.

2. Type: workflow_scheduled_transition
Message: Symfony\Component\Routing\Exception\MissingMandatoryParametersException: Some mandatory parameters are missing ("workflow_transition") to generate a URL for route "entity.workflow_scheduled_transition.canonical". in Drupal\Core\Routing\UrlGenerator->doGenerate() (line 182 of /www/workflow.lightning.demoweb.us/htdocs/docroot/core/lib/Drupal/Core/Routing/UrlGenerator.php).

3. Type: cron
Message: rupal\Core\Entity\EntityStorageException: Some mandatory parameters are missing ("workflow_transition") to generate a URL for route "entity.workflow_scheduled_transition.canonical". in Drupal\Core\Entity\Sql\SqlContentEntityStorage->delete() (line 753 of /www/workflow.lightning.demoweb.us/htdocs/docroot/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).

And then, we cannot delete the node.

Thanks.

Comments

kototoy created an issue. See original summary.

kototoy’s picture

Issue summary: View changes
johnv’s picture

I noticed thiis error some days ago. It is already fixed. lease try dev version.

I was not aware the error already exists in RC1. That is serious. I will check and create a new version if necessary.

xrampage16’s picture

I am receiving a similar error. Am attempting to schedule a node, and receive the following error

Uncaught PHP Exception Drupal\\Core\\Entity\\EntityStorageException: "Some mandatory parameters are missing ("workflow_transition") to generate a URL for route "entity.workflow_scheduled_transition.canonical"." at /var/www/html/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php line 805

Hopefully the inclusion of this line number helps resolve the issue

--------
Update: Based on the response from #3, I replaced workflow 8.x-1.0-rc1 with 8.x-1.x-dev updated 5 Dec 2017 at 14:08 UTC and still have the same issue

When attempting to remove the entity : scheduled transitions

Uncaught PHP Exception Drupal\\Core\\Entity\\EntityStorageException: "Some mandatory parameters are missing ("workflow_transition") to generate a URL for route "entity.workflow_scheduled_transition.canonical"." at /var/www/html/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php line 753

johnv’s picture

@xrampage16 , please explain exactly where the error happens:
- using normal UI or programmatically. if UI, via the block, workflow Tab, node form?
- when schenduling an new transition
- or when saving the form/entity
- or when executing cron (which executes the transition and deletes it)

xrampage16’s picture

@johnv
It happens when performing normal UI. I have attached a field to a node, the Article node. The article node in this example only contains a Title field and the workflow field.

It contains two states which are
- Draft
- Published

When I select the published option, and "Schedule" it for a time in the future, and perform a form submit on the node edit page. It results in a WSOD, and my log files display those errors.

This is also being performed inside of a docker instance, with essentially a fresh drupal install for proof of concept purposes.

If you require any additional information, let me know, as I'd be happy to assist in getting this issue resolved.

johnv’s picture

@xrampage16, are you still experiencing this issue? I cannot replicate this. Did you refresh al caches?

mferanda’s picture

I'm attempting to do an immediate transition and running into the same "Some mandatory parameters are missing" error. I've create a basic workflow with UI, a few states and simple transitions. Added workflows to content entity and trying to modify from content view. Error when trying to change transition. I also had a problem with "Time" being required when attempting to run immediate, but I believe the issue is related to the Bootstrap theme.

Problem happened with stable version... also tried dev with same result. Cache cleared, etc. Tried with two different sites, one attempt from scratch.

Drupal\Core\Entity\EntityStorageException: Some mandatory parameters are missing ("workflow_transition") to generate a URL for route "entity.workflow_scheduled_transition.canonical". in Drupal\Core\Entity\Sql\SqlContentEntityStorage->save() (line 829 of /www/nrs_sandbox/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).

Tried from the form display, view page, and workflow tab, all the same result.

johnv’s picture

Status: Active » Closed (cannot reproduce)

Sorry, I cannot reproduece any of the errors.
I will release version 1.1. shortly. Please reopen is the error still occurs.

anuar.alfetahe’s picture

Version: 8.x-1.0-rc1 » 8.x-1.1
Status: Closed (cannot reproduce) » Reviewed & tested by the community

I am receiving "Some mandatory parameters are missing ("workflow_transition") to generate a URL for route " error when tryng to schedule nodes. I've tried release and development versions(same error still). Currently using Drupal 8.6.1

anuar.alfetahe’s picture

Status: Reviewed & tested by the community » Needs review
nico.pinos’s picture

Getting the same error. Scheduling to go from one state to another using the UI.
Drupal 8.5.6

johnv’s picture

Status: Needs review » Active
johnv’s picture

Status: Active » Fixed

@nico.pinos , this should be fixed in the dev version.

Status: Fixed » Closed (fixed)

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

cobenash’s picture

Get the same error too.

Drupal 8.6.9 + worflow 8.x-1.1

Test with workflow dev got the following error

Cannot redeclare Drupal\workflow\Entity\WorkflowState::calculateDependencies() in /mydrupal/web/modules/contrib/workflow/src/Entity/WorkflowState.php, line 149

johnv’s picture

Can you try with latest dev version?

cobenash’s picture

@johnv Thanks for quick reply.

I did test with the latest dev version.

I got the following error.

Symfony\Component\Routing\Exception\MissingMandatoryParametersException: Some mandatory parameters are missing ("workflow_transition") to generate a URL for route "entity.workflow_scheduled_transition.canonical". 於 Drupal\Core\Routing\UrlGenerator->doGenerate() (在 /var/www/html/web/core/lib/Drupal/Core/Routing/UrlGenerator.php 的第 182 行)。Drupal\Core\Entity\EntityStorageException: Some mandatory parameters are missing ("workflow_transition") to generate a URL for route "entity.workflow_scheduled_transition.canonical". 於 Drupal\Core\Entity\Sql\SqlContentEntityStorage->delete() (在 /var/www/html/web/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php 的第 731 行)。Drupal\Core\Entity\EntityStorageException: Some mandatory parameters are missing ("workflow_transition") to generate a URL for route "entity.workflow_scheduled_transition.canonical". 於 Drupal\Core\Entity\Sql\SqlContentEntityStorage->save() (在 /var/www/html/web/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php 的第 783 行)。

My environment : 8.6.9 + workflow 1.x-dev

commit: #19030d5b4dd9523153a7af6e2df44cd9a03109b2

Hugo'C’s picture

Hi, same problem here when i'm trying to update/delete the scheduled node who's just created to test.

The symptoms are the same as a year ago.

Drupal\Core\Entity\EntityStorageException : Some mandatory parameters are missing ("workflow_transition") to generate a URL for route "entity.workflow_scheduled_transition.canonical". in Drupal\Core\Entity\Sql\SqlContentEntityStorage->delete()

drupal 8.6.8

workflow 8.x-1.1+35-dev
workflow_access 8.x-1.1+35-dev
workflow_moderation 8.x-1.0-alpha1
workflow_state_config 8.x-1.0-alpha2
workflow_ui 8.x-1.1+35-dev
workflow_devel 8.x-1.1+35-dev

aksk1119’s picture

Hi! I am trying to delete nodes and the content type, and I am getting the same error.

> [error] Symfony\Component\Routing\Exception\MissingMandatoryParametersException: Some mandatory parameters are missing ("workflow_transition") to generate a URL for route "entity.workflow_scheduled_transition.canonical". in Drupal\Core\Routing\UrlGenerator->doGenerate() (line 182 of /builds/byu-capstone/Drupal8/web/core/lib/Drupal/Core/Routing/UrlGenerator.php).
> [error] Drupal\Core\Entity\EntityStorageException: Some mandatory parameters are missing ("workflow_transition") to generate a URL for route "entity.workflow_scheduled_transition.canonical". in Drupal\Core\Entity\Sql\SqlContentEntityStorage->delete() (line 758 of /builds/byu-capstone/Drupal8/web/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).
> [error] Some mandatory parameters are missing ("workflow_transition") to generate a URL for route "entity.workflow_scheduled_transition.canonical".

Any suggestions?

localnetwork’s picture

Has anyone found a solution? Badly needed this.

johnv’s picture

Title: "Schedule for state change" does not proceed » Route "entity.workflow_scheduled_transition.canonical" error with 'Schedule for state change"