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.
I'm using Group module.
When we create a group content, there is a need of creating a group node and we can noticed that the submit message is this: Continue to final step
. Then when we tick the button, we are directed to final confirmation to create the group node so that group content will be successfully created.
I am aware of the set up but what I want is that when I create a group content, group node will also be created without the second confirmation button.
Is this possible? Or can this be achieve in templating, if so, how?
Comment | File | Size | Author |
---|---|---|---|
Screen Shot 2017-03-06 at 5.54.25 PM.png | 19.25 KB | johnreytanquinco |
Comments
Comment #2
alan.upstone CreditAttribution: alan.upstone commentedHello John Rey
If I have understood you correctly, you want to create content in a group without having to use a two-step form. The extra step is in case you want to store some data on the group content entity, which records the relationship between the group and the content (the node).
If you don't want that extra step, you can untick the box described in comments 27 and 28 of this fix provide a generic and extensible UI for adding new content into a Group.
Cheers
Alan
Comment #3
kristiaanvandeneyndeExcellent explanation by Alan, thanks for that!
Comment #4
johnreytanquinco CreditAttribution: johnreytanquinco commentedPerfect! That is the solution I needed. But when I tried to apply the patch, I encountered this error running
drush cr
,PHP Fatal error: Cannot redeclare Drupal\group\Entity\Routing\GroupContentRouteProvider::getRoutes() in /Applications/MAMP/htdocs/drupal-8.2.3/modules/group/src/Entity/Routing/GroupContentRouteProvider.php on line 69
Also, when I test creating another group, I wasn't able to gain access on the group. So, I check the group permission and got another error of this:
PHP Fatal error: Call to undefined method Drupal\gnode\Plugin\GroupContentEnabler\GroupNode::getEntityType() in /Applications/MAMP/htdocs/drupal-8.2.3/modules/group/src/Plugin/GroupContentEnablerBase.php on line 192
Thanks again.
Comment #5
johnreytanquinco CreditAttribution: johnreytanquinco commentedComment #6
johnreytanquinco CreditAttribution: johnreytanquinco commentedAlright, I reverse the patch and just did an update to the module. It works smoothly. Errors are gone. Thanks Alan for the answer and Kristiaan for your great module! Cheers!