Skip to content
Snippets Groups Projects
Verified Commit 771adc48 authored by Lee Rowlands's avatar Lee Rowlands
Browse files

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
parent dbb87e1b
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -251,8 +251,9 @@ protected function actions(array $form, FormStateInterface $form_state) { ...@@ -251,8 +251,9 @@ protected function actions(array $form, FormStateInterface $form_state) {
'#submit' => ['::submitForm', '::preview'], '#submit' => ['::submitForm', '::preview'],
]; ];
$element['delete']['#access'] = $node->access('delete'); if (array_key_exists('delete', $element)) {
$element['delete']['#weight'] = 100; $element['delete']['#weight'] = 100;
}
return $element; return $element;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment