backdrop-contrib / og

The Organic Groups module provides users the ability to create, manage, and delete 'groups' on a site.
GNU General Public License v2.0
1 stars 8 forks source link

Include View for "All Available Groups" #94

Closed stpaultim closed 2 years ago

stpaultim commented 2 years ago

I think this would be a really useful view/block to include with the module by default. I have to keep recreating each time for testing purposes.

Is it a problem, because we don't know what the name of the group content type will be?

argiepiano commented 2 years ago

I think this would be a good idea. I think mostly it's not there because you have to decide what entities are groups - typically it's a node, but it could be any other fieldable entity.

Is it a problem, because we don't know what the name of the group content type will be?

There has to be a way with required relationships or filters to accomplish this...

stpaultim commented 2 years ago

I added a PR for a view of all nodes that are groups. Since other entities can also be groups, this might not be good enough. But, it's a start.

stpaultim commented 2 years ago

Thanks for feedback on PR, I'll try to update it tonight.

Also - maybe we could just put this view in the demo content module - if we decide to go that route. https://github.com/backdrop-contrib/og/issues/102

stpaultim commented 2 years ago

Updated PR, but I think there is a problem.

This view is broken if there are no existing groups. It's going to need additional work.

argiepiano commented 2 years ago

@stpaultim , yes, this is a design flaw of OG that I ran into a few days ago. The Views group field handlers are not created until there is an actual group (silly!), so if you try to open the View before creating content youll get a broken handler. That goes away if you create a group and flush caches. I wouldn't worry about it.

Perhaps we should tackle this bug at some point. It's present in D7. It tells you that OG was built by different people in an uneven way throughout a long period of time. It's full of "warts and patches"

stpaultim commented 2 years ago

@argiepiano We put a view for all available groups into the demo content module. Is that enough? Should I close this PR and ticket?

argiepiano commented 2 years ago

I think the view in the demo module is enough to give site builders a hint on how to do it. I'm fine closing this if you wish

argiepiano commented 2 years ago

Since the OG Example module includes such a view (and given that the view is pretty straightforward - it just contains a filter for the group_group field being true) I will go ahead and close this issue and the related PR.

Fee free to reopen if you feel strongly about this view.