Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
It seems like a lot of things are changing in Organic groups 7.x-2. I'm trying to add Statuses to a group with a context where the Statuses view shows on group node types. But I get this error:
Fatal error: Call to undefined function og_get_group_ids() in /home/scbp/public_html/drupaldev/sites/all/modules/statuses/includes/utility/statuses.contexts.inc on line 233
Any ideas what could be causing this?
Thanks so much!
Comment | File | Size | Author |
---|---|---|---|
#12 | statuses-og2-1679626-12.patch | 7.01 KB | IceCreamYou |
#7 | statuses-1679626-1.patch | 6.76 KB | Renee S |
#4 | statuses-1679626-0.patch | 6.77 KB | Renee S |
#2 | statuses-1679626.patch | 5.33 KB | Renee S |
Comments
Comment #1
IceCreamYou CreditAttribution: IceCreamYou commentedWe will support OG 7.x-2.x but it will not be a priority until after Statuses has a release candidate or OG 7.x-2.x becomes the recommended branch (or someone else writes a patch for it).
Comment #2
Renee S CreditAttribution: Renee S commentedRough work attached. Still testing use-cases. Needs a bit more work still, but here sos people can test. The problem right now is that it doesn't seem to respect og_is_member (and for that, $group_type is actually expected to be given as the content type numeric ID, which is strange and not like how the rest of the OG functions work). The user has to have full permissions to view all statuses, not just be a member of the group.
Comment #3
IceCreamYou CreditAttribution: IceCreamYou commentedThanks for the patch; it helps to have a start. Please note that any fix needs to preserve support for both branches. The easiest way to do that is to check for the existence of a function that is only in one of the branches and use that to determine the appropriate behavior.
Also, there are some formatting things... the Coder module can help catch these. Spaces instead of tabs, spaces after control statements, etc.
Comment #4
Renee S CreditAttribution: Renee S commentedAhh, thanks for the tips. Better patch attached, coder-reviewed and both OG 1 and 2 compatible. There's still a bit of logic weirdness, but it's much closer...
Comment #5
Renee S CreditAttribution: Renee S commented[argh]
Comment #6
mathankumarc CreditAttribution: mathankumarc commentedTrailing whitespaces
Trailing whitespace
I didn't looked into the logic.
Comment #7
Renee S CreditAttribution: Renee S commentedTest away, folks. Making sure the logic works would be helpful.
Comment #8
Renee S CreditAttribution: Renee S commentedComment #9
IceCreamYou CreditAttribution: IceCreamYou commentedI will try to get some time to look at this on Saturday. If I don't get to it I will do it next week.
Comment #10
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedI have a content type, article.
the article belongs to a group
I created an article and assigned it to a group
I used panels to change layout. panel has content as a mandatory context
I added statuses block
expected result is statuses block shows up
actual result; WSOD without anything in error logs
with the patch WSOD goes away.
But I still don't see the statuses block
Comment #11
barry6575 CreditAttribution: barry6575 commentedAny updates or feedback on this patch? I wish I could help but I'm unfamiliar with coding.
Comment #12
IceCreamYou CreditAttribution: IceCreamYou commentedThank you for your patience. Here is a revised patch. There is also OG integration in the Services submodule which I have not looked at.
I have tested the attached patch and it is working for me. If someone else can confirm it is working it can be committed. Please note that this patch cannot be applied at the same time as #1721452: Statuses not picking nid from a page with custom path (so whichever one we commit second we will need to re-roll).
Comment #13
IceCreamYou CreditAttribution: IceCreamYou commentedI committed #1721452: Statuses not picking nid from a page with custom path and it turns out the patch in #12 still applies -- just wouldn't have worked in reverse order.
Comment #14
barry6575 CreditAttribution: barry6575 commentedI tested the new patch and it's working for me.Thanks!
Comment #15
IceCreamYou CreditAttribution: IceCreamYou commentedGreat! Committed to dev.