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

Contribution Statement Generator Block Throws Exception When No Valid Person Is Passed Via Querystring #5705

Closed
2 tasks done
JimMichael opened this issue Jan 4, 2024 · 2 comments
Labels
Fixed in v16.3 Status: Confirmed It's clear what the subject of the issue is about, and what the resolution should be. Topic: Finance Related to finance. Type: Bug Confirmed bugs or reports that are very likely to be bugs.

Comments

@JimMichael
Copy link
Collaborator

Description

When the Contribution Statement Generator block is configured with Allow Person QueryString set to Yes
image

the page that the block is on will throw an exception IF no valid user is passed in the querystring and the page is available to All Users.

Actual Behavior

You get an "Oops that wasn't supposed to happen" error on the page and Rock throws a Null Reference exception
image

Expected Behavior

When the page/block is configured to Allow All Users AND the visitor is not logged in AND there is no valid PersonActionIdentifier passed to the page, it should present a graceful "not authorized to see this page" or similar message instead of throwing an exception.

Steps to Reproduce

  1. On demo site, go to Admin | CMS Config | Pages | External Homepage | Give | Giving History | Contribution Statement

  2. Change the security on the page to Allow All Users

  3. Edit the block settings and set Allow Person Querystring to Yes.

  4. Visit https://rock.rocksolidchurchdemo.com/page/444 (in a private browser window so you're not authenticated) and observe exception since there is no Person being passed to the page/block.

I'm entering this as a bug because, well, it's an exception occuring on a valid configuration, but also because block with similar "PersonActionIdenfier" functionality that are open to All Users (such as the Email Preference/Unsubscribe page) present a graceful error message when no person is passed vs. throwing an exception.

Issue Confirmation

  • Perform a search on the Github Issues to see if your bug or enhancement is already reported.
  • Try to reproduce the problem on a fresh install or on the demo site.

Rock Version

v14-v16+

Client Culture Setting

en-US

@bmurphy-dev
Copy link
Contributor

I can confirm this behavior.
image

@sparkdevnetwork-service sparkdevnetwork-service added Type: Bug Confirmed bugs or reports that are very likely to be bugs. Topic: Finance Related to finance. Status: Confirmed It's clear what the subject of the issue is about, and what the resolution should be. Status: In Dev Queue This issue is being worked on, and has someone assigned. labels Jan 4, 2024
@sparkdevnetwork-service sparkdevnetwork-service removed the Status: In Dev Queue This issue is being worked on, and has someone assigned. label Jan 10, 2024
@unlearnd
Copy link
Contributor

See also 4d453fc

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

No branches or pull requests

4 participants