In _spaces_og_form_alter_node() the list of groups a content type can appear in is restricted to groups which have an enabled context feature which uses that type. This is true even if the content type being edited is set to a "Standard group post" in og settings.
I have a context feature which applies to one type of node (a group homepage) but sets a views block that lists a second node type (a list of recent news posts). I would like to have this context only apply to the homepage content type so that the recent news posts block doesn't appear on news post nodes. However if I don't list the news post content type in the context, I can't add new news posts to groups.
I'm listing this as a feature because I'm guessing the current behavior is intentional. I'm also relatively new to Drupal so if I'm missing something and there's already a way to do this with spaces_og, I'm all ears. :-)
Comments
Comment #1
yhahn commentedHi lxs,
What if you move the news content type into its own feature/context that can be enabled for the groups? If I understand correctly your current setup is something like this:
Group homepage feature
What if you try:
Group homepage feature
News feature
You may want to add a page listing or so to your news feature anyway so that users can view any news stories that don't fit in your block.
Comment #2
lxs commentedI do have a news page, but it is normally only linked to by the block (a "more" link).
I can certainly make a news feature but my users will still see the same confusing behavior if they leave the homepage feature on and turn the news feature off. Also, my group admins can create news nodes with the news feature on, but if they turn the news feature off they can no longer edit any existing news nodes (it will refuse to save because it can't assign the node to any groups -- including the group it currently belongs to).
Would it be possible to make a spaces_og setting that allows the admin to set whether or not Spaces restricts group posts to content types in enabled features? Alternatively context could store "auxiliary" content types (ones which are used by the blocks set by the context). spaces_og could then include these extra content types when it forms the list of valid group post types.
Comment #3
halcyonCorsair commentedHi yhahn,
I've also noticed this issue where spaces_og has various weird behaviour going on. If a node type isn't part of a feature context, then it will be given an og_ancestry.group_nid value of 0, and will always be considered private, regardless of whether the context/group is meant to be public.
In fact, spaces_og seems to stomp all over group privacy, but perhaps thats a separate issue.
Is there a reason you don't simply check $space->group->og_private?
I guess I could make each content type into a feature, but isn't that a little heavyweight?
Comment #4
jmiccolis commentedSetting this to won't fix - as we're not maintaining the 1.x series anymore. I'd encourage any of you to take a look at spaces 3.x