SparkDevNetwork / Rock

An open source CMS, Relationship Management System (RMS) and Church Management System (ChMS) all rolled into one.
http://www.rockrms.com
580 stars 353 forks source link

Prayer Card View Throwing Error When Someone Logged Out Hits "I Prayed" With Prayed Workflow Configured #5986

Closed ChristineBema closed 3 months ago

ChristineBema commented 3 months ago

Description

When using the Prayer Card View block, if a Prayed Workflow is configured, and someone who is not logged in tries to pray for the request, an "Object reference not set to an instance of an object" exception is thrown. The Prayed Workflow does not get launched. Video of issue

Actual Behavior

When someone not logged in clicks the "I Prayed" button on a prayer request displayed on the Prayer Card View block, and a Prayed Workflow is configured, an exception is thrown and the Prayed Workflow is not launched.

Expected Behavior

I would expect that whether a person is logged in or not, no exception gets thrown, the prayer count is increased, and the Prayed Workflow is launched. This is happening because in the PrayerRequestService.cs, an exception is thrown when there is no CurrentPerson, but there will not be a CurrentPerson when someone is not logged in. image

Steps to Reproduce

Issue Confirmation

Rock Version

16.2

Client Culture Setting

en-US