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 doing my first site build with Group in D8 and ran into a confusing message.
Steps to Reproduce:
- Install site, enable Group
- Create a "Test Group" group type. Leave checkboxes at default settings.
- Create a test group "Test Group 1" of type "Test Group". Save.
- Edit "Test Group 1". The Save button says "Create Test Group Type and become a member" though the group exists and I am, per default settings, already a member.
Editing the Group Type and disabling the "The group creator automatically becomes a member" checkbox makes the button display "Save" as expected.
The code that modifies the button text is in GroupForm.php::actions, line 77. Perhaps just a condition is needed to check whether the form is in Add or Edit mode?
Comment | File | Size | Author |
---|---|---|---|
#5 | group-edit-button-2886227-5.patch | 2.3 KB | kevin.dutra |
| |||
Screen Shot 2017-06-14 at 11.08.31 AM.png | 55.38 KB | floydm |
Comments
Comment #2
jalpesh CreditAttribution: jalpesh as a volunteer and at Cybage Software Pvt Ltd. commentedLooks like valid scenario. I think instead of changing button to "Save", it should be "Save @group_type and membership" so final text for Test group will be "Save Test Group and membership".
Maintainer has already take care of add/edit case condition for button text. we need to change only text at line number 77 in GroupForm.php.
I have attach a patch for same. Let me know your thought/suggestion. Thanks.
Comment #4
seanB+1 for the change in #2
Do we actually change the membership when you edit a group? I think when you edit a group it should just say 'Save' right? We don't do anything with the membership in that case.
Besides that, there is also the text
Create @group_type and complete your membership
. We should change this toSave @group_type and complete your membership
as well.I haven't tested it, but what happens when you click
Create @group_type and complete your membership
? Do you go to the page where you can add yourself as a member? If not we should just change the button to 'Save' for this situation.Last thing. If the users has configured the module to not automatically become a group member, I'm not sure why we should forward them the the page where they can add a membership anyway?
Comment #5
kevin.dutra CreditAttribution: kevin.dutra at Workday, Inc. commentedHere's a small change. This only changes the case where you're editing the group, allowing the normal "Save" text to come through.
When creating, there's basically 3 logic paths:
Create @group_type and complete your membership
)Create @group_type and become a member
)Save
)Personally, I think the two specialized create buttons are way too verbose and as an end user I don't care. I'd be fine with "Save" or maybe "Save and continue" when the wizard is used. At any rate, I'll leave the other buttons for a followup, since they at least reflect what's happening in those cases and may warrant further discussion.
Comment #6
maaty388 CreditAttribution: maaty388 commentedI reproduced this problem and I get "Save" button on edit.
Comment #7
maaty388 CreditAttribution: maaty388 commentedSorry, I get an error on version 8.x-1.0-rc1 and after applying patch #5 problem was solved thank you for patch.
Comment #8
kristiaanvandeneyndeAmen to that!
Changed the code to check for
if ($this->operation == 'add') {
. Will quickly test locally and commit.Comment #10
kristiaanvandeneyndeWorks well, thanks all!