Closed (fixed)
Project:
Organic Groups
Version:
7.x-2.1
Component:
og-ui
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
10 Apr 2013 at 15:36 UTC
Updated:
12 May 2013 at 06:30 UTC
Jump to comment: Most recent file
Comments
Comment #1
amitaibuHow about moving this check to og_get_group_audience_fields().
Comment #2
Angry Dan commentedGood idea! Attached is a second patch that should do exactly that.
I've had to add a group_type argument to og_get_group_audience_fields() which is a well used function already, but I'm considering if group_bundle might also be useful, since an entity reference can be locked to a set of bundles.
Anyway, thoughts on the patch are welcome!
Comment #4
Angry Dan commentedWoops! Fixing that last, broken, patch - this one works - I've tested it.
Comment #6
amitaibu#4: member-add-field-exception-1966748-4.patch queued for re-testing.
Comment #7
amitaibuMissing space.
use field_info_field()
Comment #9
Angry Dan commentedOK, new patch. Includes a re-roll, sorting the coding standard and switched to using field_info_field(). Although, not sure why - when I looked field_info_field_by_id() looked to be more performant when you have an id?
Comment #10
Angry Dan commentedComment #11
amitaibuMinor: Can you remove the spaces?
> witched to using field_info_field()
Core is using this, so following same pattern. field_info_field() is cached as-well.
Comment #12
Angry Dan commentedSorry, I'm not sure I understand - which spaces should be removed?
Comment #13
amitaibuUse Dreditor to see you patch
Comment #14
Angry Dan commentedAmazing! Why doesn't d.o do that stuff by default.
See new attached patch, with white space removed.
Comment #15
Angry Dan commentedThis patch has a small bug, the cache isn't scoped to the entity type. Attached patch should fix that.
Comment #16
amitaibuCommitted, thanks.