diff --git a/core/lib/Drupal/Core/Entity/EntityForm.php b/core/lib/Drupal/Core/Entity/EntityForm.php index b4f6bd6f022ca69eda4e1abdffbfc1866d429e4f..80e1f8cfe5a820d392781974aa7bf4b19a53d406 100644 --- a/core/lib/Drupal/Core/Entity/EntityForm.php +++ b/core/lib/Drupal/Core/Entity/EntityForm.php @@ -90,7 +90,7 @@ public function getFormId() { $form_id .= '_' . $this->entity->bundle(); } if ($this->operation != 'default') { - $form_id = $form_id . '_' . $this->operation; + $form_id = $form_id . '_' . str_replace('-', '_', $this->operation); } return $form_id . '_form'; } diff --git a/core/tests/Drupal/Tests/Core/Entity/EntityFormTest.php b/core/tests/Drupal/Tests/Core/Entity/EntityFormTest.php index 15fd2345920468fa610a215b6c6772814d0bdad9..8aa31cafaf2b057517aa93f03ec2a87c7d99945c 100644 --- a/core/tests/Drupal/Tests/Core/Entity/EntityFormTest.php +++ b/core/tests/Drupal/Tests/Core/Entity/EntityFormTest.php @@ -97,6 +97,11 @@ public function providerTestFormIds() { 'bundle' => '', 'operation' => 'delete', )), + array('workflow_edit_state_form', array( + 'entity_type' => 'workflow', + 'bundle' => '', + 'operation' => 'edit-state', + )), ); }