- Issue created by @mesharideb
- First commit to issue fork.
- Merge request !3Issue #3495557 by mesharideb: Remove add-child operation when max depth is zero → (Open) created by mesharideb
Problem/Motivation
The ‘Add child’ operation is displayed in the taxonomy term actions dropdown, even when a vocabulary’s Max Depth is set to 0.
While the module prevents child term creation through validation, the presence of this operation in the dropdown is misleading, as it suggests the action is allowed when it is not.
This can lead to user confusion and unnecessary interactions, impacting workflow efficiency and clarity.
Proposed Resolution
• Create a TaxonomyTermOperationAlterer service that evaluates the Max Depth setting of a vocabulary and removes the ‘Add child’ operation when the depth is 0.
• Implement hook_entity_operation_alter() to dynamically alter operations and delegate logic to the service.
Active
2.1
Code