Description

Wiki groups no longer preserve ordering.

Steps to reproduce

n/a

Example

http://wireless.kernel.org/en/developers/navi

my theme code relies on ordering -- the order should be that way in the theme (compare the two lists)

Component selection

Details

MoinMoin Version

1.9 repo as of today

OS and Version

Python Version

Server Setup

Server Details

Language you are using the wiki in (set in the browser/UserPreferences)

Workaround

Discussion

Fix:

Index: moin/MoinMoin/datastruct/backends/__init__.py
===================================================================
--- moin.orig/MoinMoin/datastruct/backends/__init__.py  2010-02-09 09:12:41.000000000 +0100
+++ moin/MoinMoin/datastruct/backends/__init__.py       2010-02-09 09:12:50.000000000 +0100
@@ -180,10 +180,10 @@
         """
         Retrieve group data from the backend and filter it to members and group_members.
         """
-        members_retrieved = set(self._backend._retrieve_members(self.name))
+        members_retrieved = list(self._backend._retrieve_members(self.name))
 
         member_groups = set(member for member in members_retrieved if self._backend.is_group_name(member))
-        members = members_retrieved - member_groups
+        members = [memb for memb in members_retrieved if not memb in member_groups]
 
         return members, member_groups

I think keeping order is important -- ReimarBauer 2010-02-08 21:54:32

TODO

Plan


CategoryMoinMoinBug

MoinMoin: MoinMoinBugs/GroupsNoLongerKeepOrder (last edited 2011-08-10 07:47:12 by JohannesBerg)