0 Trouble with Known Relationships and Lava 2 Michael Garrison posted 8 Years Ago I know I've still only scratched the surface of Rock's database table structure, but this one's got me stumped ... and to a certain extent I'm pretty sure there's a bug. I'm just not sure where the bug is so I wanted to get some thoughts from the community. - I've got a profile badge that uses Lava to check for the existence of a certain known relationship. - When deleting or modifying an existing known relationship of this type, the badge does not disappear. - After deleting this known relationship, if I create another, TWO badges appear. Although only one "known relationship" is shown on the profile. - I can use lava to discover the Known Relationship groups- using the group viewer on the given IDs I can see that both the deleted and the current "known relationship" groups still exist, are active, and have both people as members. - Querying the [Group] and [GroupMember] tables on the given Groups, I can see no difference between the deleted and the current "known relationship". I confess I'm mystified as to why deleting a known relationship does not simply delete the group. But since there's obviously a method that Rock uses to tell whether a given Known Relationship is active or not, I suppose that I'm simply curious as to why and how that's accomplished. The bigger deal, I think, is that Lava seems to be equally at a loss as I am to tell a current Known Relationship from a deleted one. Is that a bug in the Known Relationship mechanism? A bug in Lava? Or am I using the Person | Groups filter wrong? I'm looping through all Known Relationships like so, looking for a specific phrase in the Role: {% assign groupMembers = Person | Groups: "11" %} {% for groupMember in groupMembers %} {% if groupMember.GroupRole.Name contains 'Surviving' %} <div class="badge"> <img src="//ccof.net/images/site/angel.png" style="vertical-align:bottom;height:45px;" alt="Deceased Family Member" title="{{ Person.NickName }} has lost a family member- please see the "Known Relationships" box at the bottom of their profile for details." /> </div> {% endif %} {% endfor %} (Note I'm looking for just "Surviving" so that it matches EITHER my custom "Surviving Spouse" and "Surviving Parent" known relationship roles that we created). Obviously a fix for the double badge appearance is to simply exit the loop once one is found. But that wouldn't fix the fact that if I delete all such relationships, the badge persists.
Michael Garrison 8 years ago By looking up the group by ID in the group viewer, I can see that both people's "Member Status" is "Active" for both the deleted and the current known relationship group.I should have mentioned originally (and actually thought I did) that I looked up the groups in question in a SQL query- other than the GroupId column, all data was identical between the given groups between the current and deleted known relationship group, checking both the [Group] and the [GroupMember] tables.