progressivetech / net.ourpowerbase.qrcodecheckin

QRCode Checkin allows you to send an email that contains a scanable code to the registered participants for your event.
Other
16 stars 15 forks source link

There was an error updating the status #7

Closed netzih closed 2 years ago

netzih commented 5 years ago

Trying to update the status of a contact after initial install (just found this now) Im Getting an error saying "There was an error updating the status" when trying to update to attended. When looking in the Console I'm getting

{fields: Array(1), error_code: "mandatory_missing", entity: "Qrcodecheckin", action: "checkin", is_error: 1, …} action: "checkin" entity: "Qrcodecheckin" error_code: "mandatory_missing" error_message: "Mandatory key(s) missing from params array: participant_id" fields: ["participant_id"] is_error: 1 proto: Object

This is on a wordpress install

jmcclelland commented 5 years ago

Can you share the path part of the URL that you are clicking on? In other words: https://someserver.org/HERE/IS/THE/PATH

I don't need "someserver.og" - just the path that comes after it.

I suspect that Wordpress is generating URLs differently then drupal so the code the extracts the participant id from the URL needs to be adjusted.

netzih commented 5 years ago

the path is

/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fqrcodecheckin%2F29%2F5c344ba7044815dd03c3448028a43e5b9c16074cb5a6a19c7ae86165c149735f&sucuriscan_lastlogin=

I did turn on clean URL's in CiviCrm not sure if that matters.

I am not seeing anywhere where the participant ID is. I actually just realized that the error "There was an error updating the status" I only get if the actual participant is logged in. If I scan the QR code and login with a different login (even an admin) I get

Congratulations! your QR code for checkin works. Please present your code to an event ....

jmcclelland commented 5 years ago

The participant id in the URL you provided is 29. The %2F gets translated into a forward slash, so:

qrcodecheckin%2F29%2F

Becomes

qrcodecheckin/29/

If you are logged in as the participant, and the user does not have qrcodecheckin privs (or doesn't have edit event participants privs), then you should get the "Congratulations! your QR code for checkin works. Please present your code to an event .." message and not the error message.]]

If you are logged in as an admin, you should be presented with a button to update the status.

Can you check if the participant and your admin user has those permissions?

jmcclelland commented 3 years ago

Hi @netzih - I suspect we still have some wordpress kinks to work out. I'm curious if you ever got this to work?

jmcclelland commented 2 years ago

I wonder if this PR (https://github.com/progressivetech/net.ourpowerbase.qrcodecheckin/pull/17) fixed it? For now I'm going to close this issue - please let me know if the problem still persists.

agileware-justin commented 2 years ago

@jmcclelland yep, #17 would fix this issue.