Problem/Motivation
In core/lib/Drupal/Core/Menu/menu.api.php:
* Local tasks from other modules can be altered using
* hook_menu_local_tasks_alter().
This is wrong. hook_menu_local_tasks_alter() is for altering tasks pre-render. It's called at display time, not during discovery.
The discovery alter hook is hook_local_tasks_alter().
Steps to reproduce
Proposed resolution
Fix the docs.
Add a mention of hook_menu_local_tasks_alter(), to say this alters local tasks displayed on the page before they are rendered.
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
Comments
Comment #4
prem suthar commentedComment #5
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #6
prem suthar commentedComment #7
joachim commentedGood start.
But we should keep the mention of hook_menu_local_tasks_alter().
Something like:
> Additionally, hook_menu_local_tasks_alter() can be used to alter local tasks dynamically before they are rendered.
Comment #8
prem suthar commentedComment #9
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #10
prem suthar commentedComment #11
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #13
arunkumarkBack merged the 11.x core to the branch to resolve the Queue bot merge issue.
Moving to NR
Comment #14
smustgrave commentedOkay so this issue was created and tagged novice on the 17th. Novice issue are meant for new users
@Prem Suthar you picked it up less then 2 days later, and as mentioned before in several tickets your post history shows you can avoid novice issues in the future
@arunkumark same deal
Both please try to avoid novice issues unless they've sat there for a few weeks, which wasn't the case here.
Believe @joachim feedback was addressed though
Comment #18
nod_Committed and pushed 9678dc6468 to 11.x and 71bcc296f5 to 10.4.x. Thanks!