I'm using OG 7.x-2.x, currently using the alpha3 but I know this applies to dev as well.
I have 3 content types:
- Group (group type)
- Contact (group content type)
- Project (group content type)
These are all nodes.
Project has a noderef field (references module) called "Primary Contact". I am using a view to provide the values, and I am only showing the Contacts posted to the same Group as the Project (ie. the Primary Contact for the Project is a Contact from the same Group).
This is generally working fine, until there is a bit more going on with other fields. Where I have noticed it is with filefields. When I click "Upload" to upload a filefield, and there is already a Primary Contact set, I get an error "An illegal choice has been detected. Please contact the site administrator."
When I debug a bit, I see that the file upload button is calling the url http://mydomain/file/ajax/..., and within that callback, a call is being made to og_context, and it's not returning anything for gid. When this happens, the valid Primary Contact value is not present in the allowed values (since there is no group context in that validation request).
I'm not sure why unrelated fields are being run through validation routines when files are uploaded. I don't know if this is a core issue or what.