I'm using the group module, and in a custom module I'm trying to create a local task that will bring you directly to the create page for a particular group content type. My goal is to skip the create page where you select the content type.
I've defined a local task:
entity.group_content.create_form:
route_name: entity.group_content.create_form
title: 'Add new service'
defaults:
plugin_id: group_node:service
appears_on:
- 'view.group_services.page_1'
It doesn't complain about passing the $group
for the access check, which I'm assuming is being successfully passed due to query magic. Where it breaks down is on $plugin_id
on the access check with the error.
RuntimeException: Callable "Drupal\group\Access\GroupContentCreateEntityAccessCheck::access" requires a value for the "$plugin_id" argument. in Drupal\Component\Utility\ArgumentsResolver->handleUnresolvedArgument() (line 142 of core/lib/Drupal/Component/Utility/ArgumentsResolver.php).
As an example, the route I'm trying to provide would end up being:
/group/{group}/content/create/{plugin_id}
aka
/group/1/content/create/group_node%3Aservice
What am I missing here?