Information on 2.x here: http://www.gizra.com/content/og7-and-entity-reference-sponsor-me
There have been major API changes with og and I am willing to work through the changes that will need to take place to get spaces_og in compliance. It is a selfish endeavor to assure our OpenScholar D7 package is up to date.
Any thoughts on the best way to contribute these major changes to the spaces_og.module
| Comment | File | Size | Author |
|---|---|---|---|
| #44 | 1470434-spaces-og2-44.patch | 20 KB | dalin |
| #6 | 1470434-6-og-7_2x.patch | 19.34 KB | rbrandon |
| #11 | spaces-og-7_2x-11.patch | 508 bytes | arosboro |
| #12 | spaces-og-7_2x-11.patch | 508 bytes | arosboro |
| #13 | spaces-og-7_2x-13.patch | 517 bytes | arosboro |
Comments
Comment #0.0
rbrandon commentedcorrect link target
Comment #1
JohnnyX commentedInterested in og combined with spaces_og_forum (which needs spaces...).
Following here...
Comment #2
scottrigbyCrossreffing #1203046: Spaces 7.x-4.x Architecture
Comment #3
rbrandon commentedHere is a first pass at a patch which fixes all the major errors/bugs for 'spaces_og' but still needs a bit of refinement. The views still need work as well as some thought about how the group type is going to be handled. Also still need to get to the taxonomy module.
- Richard
Edit: Use next patch, error in this one
Comment #4
rbrandon commentedRe-Made patch, not sure what happened with the last.
Comment #5
rbrandon commentedThis fixes the issues with "In Current Space" view filter aka "spaces_handler_filter_spaces_current". And updates the spaces_og code to work with it and dynamically add the necessary og entity_ref relationship.
-Richard
Comment #6
rbrandon commentedSorry to wait so long to post an updated patch. I updated to the latest dev of spaces and re-created my patch with all of my most current changes. There was still a bit of work to do around private sites and especially the "Spaces current space". Took some testing to get the filter working correctly even when a relationship had not been explicitly added to the view or when multiple "Current Space" filters were used in the same view on different tables.
We have been using this code for a month now without any major bugs, I will update the patch if I find anything else.
-Richard
Comment #7
rbrandon commentedComment #8
Renee S commentedThanks, rbrandon! Seems to work for the defaults, although I'm getting an error when I try to create a new preset:
1. Create new Group spaces preset: admin/structure/spaces
2. Receive the following error on create and on save after edit:
Notice: Undefined variable: group_form in _spaces_og_form_spaces_preset_editor_alter() (line 232 of sites/all/modules/contrib/spaces/spaces_og/spaces_og.pages.inc).
Warning: array_intersect_key() [function.array-intersect-key]: Argument #1 is not an array in _spaces_og_form_spaces_preset_editor_alter() (line 232 of sites/all/modules/contrib/spaces/spaces_og/spaces_og.pages.inc).
Notice: Undefined index: og_register in _spaces_og_form_spaces_preset_editor_alter() (line 236 of sites/all/modules/contrib/spaces/spaces_og/spaces_og.pages.inc).
Notice: Undefined index: og_directory in _spaces_og_form_spaces_preset_editor_alter() (line 236 of sites/all/modules/contrib/spaces/spaces_og/spaces_og.pages.inc).
Notice: Undefined index: og_private in _spaces_og_form_spaces_preset_editor_alter() (line 236 of sites/all/modules/contrib/spaces/spaces_og/spaces_og.pages.inc).
There aren't any configuration options showing up under the OG Settings.
3. When I go into an existing preset, I get:
Notice: Undefined variable: group_form in _spaces_og_form_spaces_preset_editor_alter() (line 232 of sites/all/modules/contrib/spaces/spaces_og/spaces_og.pages.inc).
Warning: array_intersect_key() [function.array-intersect-key]: Argument #1 is not an array in _spaces_og_form_spaces_preset_editor_alter() (line 232 of sites/all/modules/contrib/spaces/spaces_og/spaces_og.pages.inc).
Comment #9
Renee S commentedComment #10
arosboro commentedI applied this patch and everything is working. I haven't made any presets, so I haven't run into the issues outlined in #8. One issue I have noticed is that the home page setting on the features tab does not redirect to the path specified when accessing a purl path with no arguments. What are your thoughts on redirecting the root page to the group home page when in a group context.
Also, what is the spaces_current_space filter used for?
Comment #11
arosboro commentedHere is my patch to redirect to site_frontpage (set in the features tab) when going to the purl prefix with no arguments.
Comment #12
arosboro commentedforgot to close the code block with a curly brace
Comment #13
arosboro commentedsorry for the last two patches they were the same. This one works.
Comment #14
arosboro commentedActually, I just found out that this setting can be controlled by going to /features and choosing a different frontpage path than 'frontpage'. I set it to spaces-frontpage and the home page works as designed. The problem with this is that the regular homepage without a purl prefix loads a 404 with spaces-frontpage as the default front page. My patch allows different frontpages for group and site context.
As a side note... frontpage is the path I set for the default homepage view. This is not a drupal default. Ideally the patch should be made to use variable_get and get the value of site_frontpage in the site context. I'm not sure how to accomplish this, as it seems like variable_get only returns the value for the active space.
Comment #15
arosboro commentedAn example was in API.txt. Here's a modified patch. I'm going to hold off on updating this until I receive some feedback.
Comment #16
socialnicheguru commentedpatch #6 no longer applies cleanly
is patch from comment 15 supposed to be in lieu of the patch in #6 or in addition to?
Comment #17
arosboro commentedpatch #15 is not related to 6 it makes the homepage of a group (/modifier) direct to the site_frontpage var value of the current space. Maybe it should have its own issue queue but a previous patch I wrote was merged into 6, so I moved my efforts to this thread.
Comment #18
socialnicheguru commentedpatch in #6 does not apply to newest dev version
Comment #19
rbrandon commentedI have re-created the newest patch against the latest dev.
Comment #20
amitaibuIn OG2.x there might be multiple group-audience fields, so you should use og_get_group_audience_fields() or og_is_group_audience_field()
Comment #21
socialnicheguru commentedwhen trying to create a new group preset I get the following:
Notice: Undefined variable: group_form in _spaces_og_form_spaces_preset_editor_alter() (line 232 of spaces/spaces_og/spaces_og.pages.inc).
Warning: array_intersect_key(): Argument #1 is not an array in _spaces_og_form_spaces_preset_editor_alter() (line 232 of spaces/spaces_og/spaces_og.pages.inc).
Notice: Undefined index: og_register in _spaces_og_form_spaces_preset_editor_alter() (line 236 of spaces/spaces_og/spaces_og.pages.inc).
Notice: Undefined index: og_directory in _spaces_og_form_spaces_preset_editor_alter() (line 236 of spaces/spaces_og/spaces_og.pages.inc).
Notice: Undefined index: og_private in _spaces_og_form_spaces_preset_editor_alter() (line 236 of spaces/spaces_og/spaces_og.pages.inc).
Comment #22
socialnicheguru commentedfatal error when trying to access user/1/edit/groups
PHP Fatal error: Call to undefined function og_user() in spaces/spaces_og/spaces_og.pages.inc on line 7
Comment #23
jasonawant@SocialNicheGuru
Which version are you using? Did you apply the patch in comment 19?
A solution to the first php notice and warning, are found here: http://drupal.org/node/1666692#comment-6688338
I did not see the three other notices when creating a new preset.
Jason.
Comment #24
arosboro commented@SocialNicheGuru re comment #22.
I made a simple page for this menu item that displays a table of subscribed groups and has unsubscribe links. I can contribute this to this patch, and it will resolve your issue.
Comment #25
brucebanner commentedThe patch at [#19] did not apply cleanly because it included drupal.org automatic packaging info
Rerolled without it.
Comment #26
roysegall commentedRe-rolling the patch.
Comment #27
roysegall commentedRetry for rolling the patch.
Comment #28
amitaibuFix WSOD on access check.
Comment #29
socialnicheguru commentedhttp://drupal.org/update/modules/6/7#dbtng
db_fetch* is no longer supported in Drupal 7
spaces/spaces_og/views/spaces_og_handler_field_og_group_nids.inc:45: while ($row = db_fetch_object($result)) {
Comment #30
amitaibufyi, http://drupal.org/project/og_purl
Comment #31
zikaelismik commentedHello, i'm having the same issues of undefined index notices (og_private etc) when creating new preset. Also the OG setting panel is empty. If i edit an existing one i don't see any error but still the OG setting panel shows empty.
I've never used these modules before, but i suppose this panel should not be empty.
I'm using Organic Groups 7.x-2.3 and spaces 7.x-3.x-dev and applied the patches in this thread to spaces.
Comment #32
cweagansWith this patch, spaces_og still depends on og_views. Is that necessary?
Comment #32.0
cweagansfat fingers
Comment #33
mach5_kel commentedWhere is everything at with these patches? I applied the latest one to my own project and just about to test it out.
Any reason this hasent been applied to the latest dev version of spaces?
I am working on a project for a company as well that need spaces and OG 2.
I am willing to check in with them to put some money forth for further development. Either partial, full, etc, depending on what is needed and how much they can afford. Feel free to PM me or respond here. I am not sure what the policy for these things are in the issues queue. However, whatever paid development we get, we are happy to return the code here to be used freely by all.
Thanks!
Comment #34
drupalycious commentedHello,
my test website breaks (blank page, no errors, nothing) as soon as I enable space_og.
I am working with the latest dev version of OG 7.x-2.x
I tried the patch on #28 but I get:
error: patch failed: spaces_og/plugins/space_og.inc:4
error: spaces_og/plugins/space_og.inc: patch does not apply
error: patch failed: spaces_og/spaces_og.info:1
error: spaces_og/spaces_og.info: patch does not apply
error: patch failed: spaces_og/spaces_og.module:269
error: spaces_og/spaces_og.module: patch does not apply
error: patch failed: spaces_og/views/spaces_og.views.inc:34
error: spaces_og/views/spaces_og.views.inc: patch does not apply
thanks
Comment #35
rlnorthcuttReroll the patch.
Comment #36
rlnorthcuttA better reroll against OG 7.2.7 with the latest dev versions of Spaces and PURL.
However, I am still getting WSOD and an error:
PHP Fatal error: Class name must be a valid object or a string in /var/www/includes/common.inc on line 7870
Comment #37
andy.alexander commentedAdding this line:
$this->group_type = "node";To space_og.inc, right above
In the constructor for space_og seems to fix the WSOD.
Comment #38
cweagansRerolling patch from root of spaces module, setting the default value of $this->group_type per #37.
Comment #39
cweagansOne more - fixes a notice when the OG access field isn't attached to the group content type.
Comment #40
blackstallion commentedPatch is required for spaces_og.pages.inc line #7. Currently its using D6 og_user (hook_user) instead of newer user api.
Comment #41
djdevinStill using spaces...
Was using an old patch, and switched to the most recent one. There's another fix to make context work.
Comment #42
grndlvl commentedAdditional fixes to add support for filtering Taxonomy, User, & Node views.
Fixes activate() to use new 7.x-2.x og_context() call.
Comment #43
grndlvl commentedForgot a couple of things.
Fixing todo to 7.x-2.x OG breadcrumbs()
Adding relation for taxonomy term to fix support for Taxonomy filtering.
Comment #44
dalinThere were some significant issues in the previous patches with Views filters. Joins were being made to
'field_data_' . OG_AUDIENCE_FIELD, but that table is always empty (which is quite the confusing thing with OG2).This patch fixes things to instead join to
og_membership.Comment #45
dalinHere's an interdiff.