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

Cannot Complete Registration when Registrar Option is Use First Registrant #5624

Closed
2 tasks done
mikedotmundy opened this issue Oct 4, 2023 · 2 comments
Closed
2 tasks done
Labels
Fixed in v16.1 Status: Confirmed It's clear what the subject of the issue is about, and what the resolution should be. Topic: Event Registration Related to Rock Event Registration.

Comments

@mikedotmundy
Copy link

Description

On an Event Registration Template, if you set the Registrar Options field to Use First Registrant, you are unable to complete the registration and are greeted with an error.

Screenshot 2023-10-04 at 12 40 56




Screenshot 2023-10-04 at 12 39 02




Exception is also created:
Screenshot 2023-10-04 at 12 42 15

Full Stack Trace:

at System.Data.Entity.Core.Objects.DataClasses.RelatedEnd.ValidateContextsAreCompatible(RelatedEnd targetRelatedEnd)
   at System.Data.Entity.Core.Objects.DataClasses.RelatedEnd.Add(IEntityWrapper wrappedTarget, Boolean applyConstraints, Boolean addRelationshipAsUnchanged, Boolean relationshipAlreadyExists, Boolean allowModifyingOtherEndOfRelationship, Boolean forceForeignKeyChanges)
   at System.Data.Entity.Core.Objects.ObjectStateManager.PerformAdd(IEntityWrapper wrappedOwner, RelatedEnd relatedEnd, IEntityWrapper entityToAdd, Boolean isForeignKeyChange)
   at System.Data.Entity.Core.Objects.ObjectStateManager.PerformAdd(IList`1 entries)
   at System.Data.Entity.Core.Objects.ObjectStateManager.DetectChanges()
   at System.Data.Entity.Internal.InternalContext.DetectChanges(Boolean force)
   at System.Data.Entity.Internal.InternalContext.GetStateEntries(Func`2 predicate)
   at System.Data.Entity.Infrastructure.DbChangeTracker.Entries()
   at Rock.Data.DbContext.RockPreSave(DbContext dbContext, PersonAlias personAlias, Boolean enableAuditing) in \Rock\Data\DbContext.cs:line 614
   at Rock.Data.DbContext.SaveChanges(SaveChangesArgs args) in \Rock\Data\DbContext.cs:line 326
   at Rock.Data.DbContext.SaveChanges(Boolean disablePrePostProcessing) in \Rock\Data\DbContext.cs:line 290
   at Rock.Blocks.Event.RegistrationEntry.UpsertRegistrant(RockContext rockContext, RegistrationContext context, Person registrar, Guid registrarFamilyGuid, RegistrantInfo registrantInfo, Int32 index, Dictionary`2 multipleFamilyGroupIds, Nullable`1& singleFamilyId, Boolean isWaitlist, Boolean isCreatedAsRegistrant, Boolean isNewRegistration, List`1 postSaveActions) in \Rock.Blocks\Event\RegistrationEntry.cs:line 2429
   at Rock.Blocks.Event.RegistrationEntry.SubmitRegistration(RockContext rockContext, RegistrationContext context, RegistrationEntryBlockArgs args, String& errorMessage) in \Rock.Blocks\Event\RegistrationEntry.cs:line 1148
   at Rock.Blocks.Event.RegistrationEntry.SubmitRegistration(RegistrationEntryBlockArgs args) in \Rock.Blocks\Event\RegistrationEntry.cs:line 481

Also, the "This Registration Was Completed By" screen should not appear at all when choosing Use First Registrant.

Actual Behavior

When selecting Use First Registrant, 1), you see the "This Registration Was Completed By" box and 2), there is an error message and you are unable to complete the registration.

Expected Behavior

When selecting Use First Registrant, 1), we should not see the "This Registration Was Completed By" box and 2), there should be no error message and registration should complete successfully.

Steps to Reproduce

Create a simple Registration Template with the following settings:

  • Allow Multiple Registrants = no
  • Registrar Options = Use First Registrant

See that you cannot complete the registration without seeing an error message.

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

v16.0, v17.0

Client Culture Setting

en-US

@sparkdevnetwork-service sparkdevnetwork-service added the Status: In Dev Queue This issue is being worked on, and has someone assigned. label Oct 4, 2023
@cabal95
Copy link
Member

cabal95 commented Oct 4, 2023

@mikedotmundy The exception has been fixed. The This Registration Was Completed By is showing up because no Email address was available from the first registrant. If you add an "Email" field and make it required then the This Registration Was Completed By message does not show up.

@cabal95 cabal95 added Status: Confirmed It's clear what the subject of the issue is about, and what the resolution should be. Topic: Event Registration Related to Rock Event Registration. Fixed in v16.1 and removed Status: In Dev Queue This issue is being worked on, and has someone assigned. labels Oct 4, 2023
@cabal95 cabal95 closed this as completed in 64a38c5 Oct 4, 2023
@mikedotmundy
Copy link
Author

Thanks @cabal95!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed in v16.1 Status: Confirmed It's clear what the subject of the issue is about, and what the resolution should be. Topic: Event Registration Related to Rock Event Registration.
Projects
None yet
Development

No branches or pull requests

3 participants