Contribution Statement Generator Block Throws Exception When No Valid Person Is Passed Via Querystring #5705
Closed
2 tasks done
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.
Description
When the Contribution Statement Generator block is configured with Allow Person QueryString set to Yes
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
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
On demo site, go to Admin | CMS Config | Pages | External Homepage | Give | Giving History | Contribution Statement
Change the security on the page to Allow All Users
Edit the block settings and set Allow Person Querystring to Yes.
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
Rock Version
v14-v16+
Client Culture Setting
en-US
The text was updated successfully, but these errors were encountered: