- Issue created by @el7cosmos
- Merge request !52Warning in HierarchyChildrenForm::actions when add child links are empty array → (Open) created by el7cosmos
There is a warning in \Drupal\entity_hierarchy\Form\HierarchyChildrenForm::actions
, when add children links are empty array
Warning: Trying to access array offset on value of type bool in Drupal\entity_hierarchy\Form\HierarchyChildrenForm->actions() (line 245 of modules/contrib/entity_hierarchy/src/Form/HierarchyChildrenForm.php).
reorder entity_hierarchy children
permission but doesn't have permission to add children node.entity.node.entity_hierarchy_reorder
route.Change the condition for $actions['add_child']
to be a link only if the $links
have 1 element, otherwise, make it a dropbutton. Dropbutton won't be rendered if the links are empty array, so this won't change the behaviour.
Active
3.0
Code (module)