- π©πͺGermany Anybody Porta Westfalica
Strange thing, I just ran into this message on a Drupal 10.1 page.
It's also a further tab on the user profile page (for Homebox 3.0.x).I also found #2883266: RuntimeException: Callable "Drupal\contact\Access\ContactPageAccess::access" requires a value for the "$user" argument. in Drupal\Component\Utility\ArgumentsResolver->handleUnresolvedArgument() β :
But no view and no usage of contact module (which is just enabled by default on the vanilla DDEV installation).This is the implementation I'm using:
/** * Implements hook_local_tasks_alter(). * * @throws \Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException * @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException */ function homebox_local_tasks_alter(&$local_tasks) { // Add route to display on the user profile page. $homeboxTypeStorage = \Drupal::entityTypeManager()->getStorage('homebox_type'); $homeboxTypes = $homeboxTypeStorage->loadMultiple(); $userId = \Drupal::currentUser()->id(); /** @var \Drupal\homebox\Entity\HomeboxTypeInterface $homeboxType */ foreach ($homeboxTypes as $homeboxType) { if ($homeboxType->getUserTabEnabled()) { $local_tasks['homebox.user_profile.homebox_type.' . $homeboxType->id()] = [ 'id' => 'homebox.user_profile.homebox_type.' . $homeboxType->id(), 'title' => $homeboxType->label(), 'route_name' => 'homebox.user_tab', 'base_route' => 'entity.user.canonical', 'weight' => -100, 'route_parameters' => [ 'homebox_type' => $homeboxType->id(), 'owner' => $userId, ], 'class' => '\Drupal\Core\Menu\LocalTaskDefault', 'provider' => 'homebox', 'options' => [], ]; } } }Perhaps it helps someone to find the root cause. For now I'll just remove the old contact module ;)