As shown in the attached screenshot the og_group_ref field uses the OG Reference widget and it does not respect the draggable selection upon saving. The only way I can find to do this is to remove all groups and then re-add in the desired order. The field_test_refs field does respect the order of referenced group nodes, but obviously displays groups the user is not a member of, etc., so it is not a solution currently.

  • Is there a better method to do this?
  • What tables/fields in the database store this order? I cannot find this information in the db.

I have yet to go through the patch at #1567492: Allow alphabetical sorting on the group audience field to see if it is relevant to this issue.

Possible solutions or workarounds for the moment look like the suggestion in the 1st comment on this issue #1902086-1: Allow group-audience widget to allow adding new content to groups a user doesn't belong to or using an entity reference field with a view to filter out the groups the user is not a member of. I do not know yet what problems the latter method may cause by not using the OG Reference field.

CommentFileSizeAuthor
og-reference_autocomplete.png19.36 KBmccrodp
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Poindexterous’s picture

I think I ran into this as well where unless you changed the groups added with the autocomplete field, the any changes in the sort order wouldn't stick. I used the entity reference view widget as a work-around at one point but I felt the UI for that widget wasn't good enough for my user customers (laymen who are barely computer literate).

Sadly I don't have enough programming skills to think of a way to fix this, but it's a feature that would help very much. I'm creating a site that will have upwards of 300 groups, and with members belonging to multiple groups we have content moderation complications (which group moderator gets notified when a node is submitted for moderation but it belongs to 2 or more groups? How do we determine group hierarchy?). We were hoping to use the group sort order for that with the autocomplete widget.