Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Updated: Comment #0
Problem/Motivation
#2004334: Separate Tabs (MENU_LOCAL_TASK) from hook_menu() is in. We want to not use hook_menu() anymore.
config_translation is trying to use plugins to add tabs. It cannot. #2044737: Provide local tasks as plugins
In general, you can put a tab on anything with hook_menu().
On the new system, you can only put a tab on things...
Proposed resolution
?
Remaining tasks
User interface changes
No.
API changes
?
Related Issues
- #2004334: Separate Tabs (MENU_LOCAL_TASK) from hook_menu()
- (config_translation trying to use plugins to add tabs, cannot) #2044737: Provide local tasks as plugins
Comments
Comment #1
YesCT CreditAttribution: YesCT commentedtagging
Comment #2
YesCT CreditAttribution: YesCT commenteduh. so @pwolanin says it is ok. people (us) who want to use plugins to add tabs on things that have tabs already (not converted yet) using the old system, that those people should "just" convert the stuff, then we will be able to use plugins to add the tabs.
Comment #3
pwolanin CreditAttribution: pwolanin commentedUsing either a derivative or something in the manager, we can add a tab to every route by default. Obviously we need to avoid calling/rendering if there is just the one for performance.
Comment #4
YesCT CreditAttribution: YesCT commentedmm. no that is a different issue: #2095117: Menu system should provide a default tab if none exists
This is about not being able to use plugins to add a tab to something that has tabs already which are added not by plugins.
Comment #5
dawehnerI don't think it is worth to rewrite a system to support legacy code and than throw out the full legacy support later.
Comment #6
pwolanin CreditAttribution: pwolanin commented@YesCT - ok, then I don't understand what the issue is about. It's true that we were blocked earlier by incomplete route conversions. What's not possible now that you need?
Comment #7
YesCT CreditAttribution: YesCT commentedI think we can come back to see if this is still an issue after tim works on #2095269: Remove add_edit_tab, core should have default tabs, and then we can clarify the problem with specifics.
Comment #8
tim.plunkettThe bug I found is that if both hook_menu and a YAML file provide a local task for the same route, only the plugin one will be read.
However, I don't think this is important to fix, let's just convert them.
Doing the ones we need now in #2095271: Add default tabs for routes expected by config_translation
Comment #9
dawehnerCan we agree to just close this issue?
Comment #10
XanoLooks like this is no longer a problem? I haven't noticed any limitations since hook_menu() was removed completely.
Comment #11
dawehnerYeah, especially the issue summary is really vacuous
Drupal indeed
feels sometimes a bit like vacuum.