Commit 6726ae2f authored by larowlan's avatar larowlan

Issue #2825516 by mikelutz, amwhalen, jhedstrom, pwolanin, ragnarkurm:...

Issue #2825516 by mikelutz, amwhalen, jhedstrom, pwolanin, ragnarkurm: hook_node_access() is called with $op = 'delete' when the create node form is shown

(cherry picked from commit 771adc48)
parent 94f79845
......@@ -251,8 +251,9 @@ protected function actions(array $form, FormStateInterface $form_state) {
'#submit' => ['::submitForm', '::preview'],
];
$element['delete']['#access'] = $node->access('delete');
$element['delete']['#weight'] = 100;
if (array_key_exists('delete', $element)) {
$element['delete']['#weight'] = 100;
}
return $element;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment