Groups show irrelevant items
|Reported by:||webcubes||Owned by:|
|Severity:||minor||Keywords:||groups, entities, elgg_list_entities|
We usually have requirements where we need to create clone of the groups plugin and enhance the features on this. We do it by copying the groups plugin, say 'community' and modifying the files in the new community plugin. We change all references to groups to community. We also change the language files as well.
But, we keep the entity type as 'groups' and we differentiate it by adding a subtype value called 'community'.
It works fine from the community view. Since we pass 'community' as the subtype to all queries, it fetches only the communities and behaves correctly.
But, when we go to the groups view and browse or search groups, it fetches all group entities irrespective on the subtype we use. So, the groups view will have groups, communities etc.
It will be a good idea to pass entity type="group" and subtype="group" in the group calls, so we can manage it. Currently, we pass ""(empty string) as the subtype value from the group pages.