Skip to content
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

Closed
1 task
davidbelk opened this issue Feb 15, 2023 · 9 comments · Fixed by #5370
Closed
1 task

Person History Page #5313

davidbelk opened this issue Feb 15, 2023 · 9 comments · Fixed by #5370
Labels
Fixed in v15.0 Status: Confirmed It's clear what the subject of the issue is about, and what the resolution should be. Type: Bug Confirmed bugs or reports that are very likely to be bugs.

Comments

@davidbelk
Copy link

davidbelk commented Feb 15, 2023

Prerequisites

  • Put an X between the brackets on this line if you have done all of the following:

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

  1. Go to Person Profile Page. Not every person is doing it.
  2. Click On Person History.
  3. See Exception:
    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__AnonymousType112 a) at System.Linq.Enumerable.WhereListIterator1.MoveNext()
at System.Collections.Generic.List1..ctor(IEnumerable1 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

  • Rock Version: 14.1
  • Client Culture Setting: US
@davidbelk davidbelk changed the title Person History Block Person History Page Feb 15, 2023
@dataCollegechurch
Copy link

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?

@MargaretMailhiot
Copy link

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

@sparkdevnetwork-service sparkdevnetwork-service added Type: Bug Confirmed bugs or reports that are very likely to be bugs. Status: Confirmed It's clear what the subject of the issue is about, and what the resolution should be. labels Feb 24, 2023
@tstephens17
Copy link

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.

@RufenachtPW
Copy link

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 )

@KCKurz
Copy link

KCKurz commented Mar 14, 2023

We updated to 14.0 and this was not an issue, but once we went into v14.1, I can isolate the problem, in our system, to pertain only to the staff members who have RSR-Rock Administration security permissions.
image

@KCKurz
Copy link

KCKurz commented Mar 22, 2023

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?

@ethan-sparkdevnetwork
Copy link
Contributor

@KCKurz Confirmed just means that someone here was able to reproduce the issue.

@nlBayside
Copy link
Contributor

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.

@azturner
Copy link
Contributor

Parkview Church encountered this error too on v14.1. Adding the a.Group == null || on line 419 of the AttendanceHistoryList.ascx.cs file fixed it for them:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed in v15.0 Status: Confirmed It's clear what the subject of the issue is about, and what the resolution should be. Type: Bug Confirmed bugs or reports that are very likely to be bugs.
Projects
None yet
Development

Successfully merging a pull request may close this issue.