Closed (won't fix)
Project:
Organic Groups
Version:
7.x-1.x-dev
Component:
og.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
12 Dec 2011 at 21:15 UTC
Updated:
7 Sep 2012 at 21:29 UTC
Jump to comment: Most recent file
Comments
Comment #1
tim.plunkettChanging the title for discoverability.
Try this patch?
Comment #2
amitaibuHi Tim :)
> I have need for calling og_get_entity_groups() on a set of entities, some of which are fully loaded, some of which do not yet exist.
Why do you need to call og_get_entity_groups() on new entities to begin with?
I'm not sold on this patch, because the API assumes you are sending an existing entity -- as a new entity anyway won't have groups associated with it. Am I missing something?
Comment #3
tim.plunkettHey Amitai!
I realize what I explained (and what I'm doing) is bizarre.
But I'm passing around shallow copies of other entities. For example, a taxonomy term with only the tid present. When there is no tid, nothing explodes.
With og, if there is a gid associated, it works fine, but for others, it throws the above error.
Someone else in IRC reported the same error, probably under more usual circumstances. Hopefully they'll chime in here...
If not, feel free to 'won't fix' and I'll add an additional check in my code.
Comment #4
amitaibu> If not, feel free to 'won't fix' and I'll add an additional check in my code.
I'll do that, as I think that's a bit too much "babysitting" for that API function to do. Sorry ;)
Comment #5
iaminawe commentedThis patch worked for me to resolve this - only other way looked like it was going to involve a core patch so grateful for this - thank you