Part of the larger #1889790: [Meta] Allow modules to register links for menus, breadcrumbs and tabs (if not with hook_menu), yet it deserves to be major because it is stalling ALL conversions with default tasks.

Both of these routes do the same thing:
admin/structure/types/manage/article
admin/structure/types/manage/article/edit
If you click the "Edit" tab that appears, it results in the first (short) route.

No where in the UI is there ever a link to a default tab. Only in tests and navigating by URL are those visited.

In my opinion, the important part is the visual tab, not the existence of a /edit URL I can visit.

Proposal

As hook_menu() is converted to routes, provide no route for them. Leave the definition in hook_menu() with no route_name, which will leave the tab and the UI unchanged.
Change all tests to not directly visit MENU_DEFAULT_LOCAL_TASK URLs.

Comments

Crell’s picture

To clarify the summary, as provide no routes for the default-tab menu items. (eg, node/$nid/view). Those are visual only.

I support this approach.

andypost’s picture

donquixote’s picture

As hook_menu() is converted to routes, provide no route for them. Leave the definition in hook_menu() with no route_name, which will leave the tab and the UI unchanged.
Change all tests to not directly visit MENU_DEFAULT_LOCAL_TASK URLs.

As long as hook_menu() is still alive, this seems like a reasonable solution.

Crell’s picture

Title: [policy, no patch] Decide how to handle routes for MENU_DEFAULT_LOCAL_TASK » [policy, no patch] Document how to handle routes for MENU_DEFAULT_LOCAL_TASK

This is what's already happening, so we just need to officially document it. Maybe in the "new routing system" change notice?

pancho’s picture

Yes, plus in the WSCCI Conversion Guide. That should be enough for the time remaining.

[edit: added a paragraph to the WSCCI Conversion Guide. Please doublecheck if it is correct and the wording okay.]

Crell’s picture

Status: Active » Fixed

Good enough for me. When we turn that into for reals proper docs we can reword as needed.

xjm’s picture

Did we also get the change notice?

andypost’s picture

Status: Fixed » Needs work

Sure, it needs change notice

pancho’s picture

Status: Needs work » Fixed

Automatically closed -- issue fixed for 2 weeks with no activity.