New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Person History Page #5313
Comments
I am unable to reproduce this on the demo site. Is there a specific person profile on the demo site you were able to reproduce this error on? |
The demo site is only on 14.0. We just updated to 14.1 this week and are running into this same error on profiles |
We have a client where we are seeing this as well. The person I noticed it on is a staff member with a lot of attendance. If that detail helps at all. |
I ran into this issue as well. Upon troubleshooting, I found the issue has to do when an attendance occurrence record does not have a GroupId. The column, GroupId, on the attendanceOccurrence table allows nulls. On line 419 of the AttendanceHistoryList there is no check for GroupId. There needs to be a check for GroupId AND check for isAuthorized and an Or to get attendances where GroupId is null Suggest changing line 419 from Where( a => a.Group.IsAuthorized( Authorization.VIEW, this.CurrentPerson ) ) to .Where( a => ( a.Group != null && a.Group.IsAuthorized( Authorization.VIEW, this.CurrentPerson )) || a.Group == null ) |
Please disregard my previous comment, I now have encountered this error on a nonstaff Rock profile. I see this task is "Confirmed", does that mean it is being worked on to bring resolution? |
@KCKurz Confirmed just means that someone here was able to reproduce the issue. |
We are also seeing this issue at our church. The records that are causing it are ones imported in from before we used Rock, so their GroupIds are null. Still an issue since we imported a lot of previous data. |
Prerequisites
Description
Person history under the person profile shows an exception when trying to view the history for most people but not all. I have tried to find a pattern to see if it is a specific type of history causing the issue but I cannot find a pattern yet. I have verified with Tim Dear at Pinelake Church in Mississippi and they are seeing the same issue but cannot replicate on the demo site.
Steps to Reproduce
NullReferenceException in App_Web_lzhwcf04
Message
Object reference not set to an instance of an object.
Stack Trace
at RockWeb.Blocks.Checkin.AttendanceHistoryList.<>c__DisplayClass27_0.b__9(<>f__AnonymousType1
12 a) at System.Linq.Enumerable.WhereListIterator
1.MoveNext()at System.Collections.Generic.List
1..ctor(IEnumerable
1 collection)at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at RockWeb.Blocks.Checkin.AttendanceHistoryList.BindGrid()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Expected behavior:
The expected behavior is being able to see the person history on the page.
Actual behavior:
The majority of people have the issue. A few do not.
Versions
The text was updated successfully, but these errors were encountered: