Closed mliebischer closed 1 year ago
I cannot reproduce this locally with latest development versions of Plone. But on the demo site and one client site with 5.2.0 I can reproduce this.
The code has not changed since over a year, but possibly this was fixed somewhere else in the stack.
I may check later.
this was fixed
It is currently not possible to add a usergroup into another usergroup. An exception is raised (see below). I am not sure whether it is intended nowadays to have group in groups. In any case, this should be fixed, or if this is not the intended behavior, a user-friendly error message should be displayed instead (e.g. "It is not supported to add groups to groups").
What I did:
Site Setup
-Users and Groups
-Groups
Administrators
/@@usergroup-groupmembership?groupname=Administrators
)Group Members
tab search for another group, likeReviewers
What I expect to happen:
The group should be added to the list of current group members.
What actually happened:
An error message is shown:
What version of Plone/ Addons I am using:
Seem like the code of Products.CMFPlone 5.2.1rc2 has the same bug, but I have only tested it with 5.2.0.
Also reproducible on demo.plone.org (Plone 5.2.0), see http://demo.plone.org/@@usergroup-groupmembership?groupname=Administrators
Possible cause:
The cause of this error seems to be in
Products.CMFPlone.controlpanel.browser.usergroups_groupmembership.GroupMembershipControlPanel.getMembers
. The code tries to sort a list ofNone
's andGroupData
entries against a sort function that returnsfalse
if entry isNone
or the normalized group title.Which lead us to the 'str' and 'bool' type error.
Possible fix:
Clean up
groupResults
anduserResults
before sorting them by removing any "None" entries from it.