Using a group that is both defined as a content profile and an organic group type.
Made a view of users, related through content profile to get node/group information. Added a custom field who's parent is og_views_handler_field_og_subscribe.
Since this is a user's view, there's no $values->nid, which og_views_handler_field_og_subscribe is trying to access!
Looked around and looks like a few others may be having this issue, but attach patch just addresses og_views_handler_field_og_subscribe and isn't exactly tested, thus marking it needs work. Got my custom handler working based on what doing in patch though.
This issue also would affect using relationships (wrong nid would be used likely).
(Sorry if duplicate, looked but no cigar!)
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | og.broken_views_handlers.1006576-4.patch | 6.02 KB | Grayside |
| #3 | 1006576_og_views_nid_3.patch | 5.3 KB | hefox |
| #2 | 1006576_og_views_nid.patch | 4.24 KB | hefox |
| #1 | 1006576_og_views_handler_field_og_group_nids.patch | 968 bytes | hefox |
| og_subscribe_nid.patch | 1.27 KB | hefox |
Comments
Comment #1
hefox commentedHere's the patch to fix it in og_views_handler_field_og_group_nids.
Comment #2
hefox commentedNot tested, but think I got em all
Comment #3
hefox commentedmember count didn't have nid defined
Comment #4
Grayside commentedReroll with --relative. Found another one in the is_admin handler, fixed a regression in the subscribe link field.
While this isn't a significant issue for OG as a whole, for the OG Views component I would call this Major.
Comment #5
amitaibuHaven't tested, but patch looks good, and removing the hardcoded nid makes sense.
Comment #6
Grayside commentedLooking at this more, it's all good. I'm a bit nervous about proceeding with this, but I don't want it to be held up waiting for additional testers when I'm feeling good about an easy win. I've started work in #1311190: Create Tests for OG Views to get some test coverage for this stuff, one of the primary use cases I want to add is making sure a View that accesses the OG field handlers via a relationship or two gets the data.
http://drupalcode.org/project/og.git/commit/e21a2ce