I'm doing my first site build with Group in D8 and ran into a confusing message.

Steps to Reproduce:

  1. Install site, enable Group
  2. Create a "Test Group" group type. Leave checkboxes at default settings.
  3. Create a test group "Test Group 1" of type "Test Group". Save.
  4. 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.

Image

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?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

floydm created an issue. See original summary.

jalpesh’s picture

Status: Active » Needs review
FileSize
652 bytes

Looks 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.

Status: Needs review » Needs work

The last submitted patch, 2: group_button_text_change_2886227.patch, failed testing. View results

seanB’s picture

+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 to Save @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?

kevin.dutra’s picture

Status: Needs work » Needs review
FileSize
2.3 KB

Here'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:

  1. You're using the wizard for determining group membership when you're creating the group. (Create @group_type and complete your membership)
  2. You're not using the wizard, but a membership is automatically added for the person creating the group. (Create @group_type and become a member)
  3. You're not using the wizard, and no membership is automatically added for the person creating the group. (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.

maaty388’s picture

I reproduced this problem and I get "Save" button on edit.

maaty388’s picture

Status: Needs review » Reviewed & tested by the community

Sorry, I get an error on version 8.x-1.0-rc1 and after applying patch #5 problem was solved thank you for patch.

kristiaanvandeneynde’s picture

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.

Amen to that!

Changed the code to check for if ($this->operation == 'add') {. Will quickly test locally and commit.

kristiaanvandeneynde’s picture

Status: Reviewed & tested by the community » Fixed

Works well, thanks all!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.