- Issue created by @arantxio
- 🇳🇱Netherlands arantxio Dordrecht
Here is a patch that works for now, but I don't think this is a permanent fix.
- 🇳🇱Netherlands arantxio Dordrecht
A little more context that might help.
We are targeting the tabs in the local-task menu, like this:
.tabs ul li:nth-child(2)
This menu is also manipulated using a hook:
/** * Implements hook_menu_local_tasks_alter(). */ function hook_menu_local_tasks_alter(&$data, $route_name) { if (isset($data['tabs'][0]['entity.user.canonical']['#link']['title'])) { $data['tabs'][0]['entity.user.canonical']['#link']['title'] = t('Overview'); } $routes_with_tabs = [ "entity.user.canonical", ... "user.login", "user.pass", ]; $routes_to_unset = [ "entity.user.edit_form", "entity.user.openid_connect_accounts", ... "user.pass", "entity.webform_submission.user", ]; if (in_array($route_name, $routes_with_tabs)) { foreach ($routes_to_unset as $unset_route) { if (isset($data['tabs'][0][$unset_route])) { unset($data['tabs'][0][$unset_route]); } } } }
"Some routes are removed due to custom routes that are not mandatory for the context."
this could hopefully help for a solution.