Open oseg opened 8 years ago
Hi @oseg The same problem for me, but your solution don't work for my or is needed more changes. I test in 2.1.1 and 2.2.0 with the las version os subgroups 2.1.1 Some help?? @beck24
Hi dragonjon, Be careful, some 3rd party plugins (like group_tools for instance) overwrite the groups/edit action. In these cases, you need to patch the actions/groups/edit.php file in the 3rd party plugin directory (group_tools for instance).
Thanks @oseg for the advise I test in some days in the group tools plugins, is installed in my dev system too. Good work Thanks Jon
Scenario: 1- In the Elgg Administration/Configure/Settings/Groups, set "Who can create new groups?" to "Administration" 2- As an admin create a group with the following settings: . Check: Subgroups: Enable Sub-Groups for this group? . Uncheck: Subgroups: Enable any member to create subgroups? (if no, only group admins will be able to create subgroups) 3- As an admin, change the group owner of this group to be a non admin user 4- Connect as the group owner and go to the group profile page 5- Click on the "Create a Sub-Group" button 6- Fill in the "Create a Sub-Group" page and click on the save button =>An error message is displayed: "You can not create a group. Only admins can."
issue reproduced on both elgg v1.12 and v2.2
This error message happens because of a groups setting check in the groups/edit action (groups plugin):
elgg_get_plugin_setting('limited_groups', 'groups') == 'yes'
To fix the issue, overload the groups/edit action with this kind of code for instance: