Support

Home Forums Event Espresso Premium HTTP 500 error when clicking 'Resend Registration Email'

HTTP 500 error when clicking 'Resend Registration Email'

Posted: February 4, 2019 at 3:25 pm


Matt Sayre

February 4, 2019 at 3:25 pm

Seeing HTTP 500 error when ‘Resend Registration Email’ envelope icon is being clicked.

EE 4.9.73.p
AM 1.0.4p
WP 4.9.9

Here is the query:
https://thefootballopening.com/wp-admin/admin.php?page=espresso_registrations&action=resend_registration&_REG_ID=18703&wp_referer%5Bs%5D=Tyson%20Vida%20&wp_referer%5Baction%5D=-1&wp_referer%5Bmonth_range%5D&wp_referer%5BEVT_CAT%5D=-1&wp_referer%5B_reg_status%5D=0&wp_referer%5Bpage%5D=espresso_registrations&wp_referer%5Broute%5D=default&wp_referer%5Bperpage%5D=50&wp_referer%5Bpaged%5D=1&wp_referer%5Baction2%5D=-1&resend_registration_nonce=f8324ce632&return=-1

Here is the fatal error:
[04-Feb-2019 21:27:53 UTC] PHP Fatal error: Uncaught TypeError: Argument 2 passed to EEH_Parse_Shortcodes::parse_ticket_list_template() must be an instance of EE_Ticket, null given, called in /home/s1/html/wp-content/plugins/event-espresso-core-reg/core/libraries/shortcodes/EE_Ticket_List_Shortcodes.lib.php on line 99 and defined in /home/s1/html/wp-content/plugins/event-espresso-core-reg/core/helpers/EEH_Parse_Shortcodes.helper.php:97
Stack trace:
#0 /home/s1/html/wp-content/plugins/event-espresso-core-reg/core/libraries/shortcodes/EE_Ticket_List_Shortcodes.lib.php(99): EEH_Parse_Shortcodes->parse_ticket_list_template(Array, NULL, Array, Array)
#1 /home/s1/html/wp-content/plugins/event-espresso-core-reg/core/libraries/shortcodes/EE_Ticket_List_Shortcodes.lib.php(61): EE_Ticket_List_Shortcodes->_get_ticket_list_for_main()
#2 /home/s1/html/wp-content/plugins/event-espresso-core-reg/core/libraries/shortcodes/EE_Ticket_List_Shortcodes.lib.php(44): EE_Ticket_List_Shortcodes->_get_ticket_list()
#3 /home/s1/html/wp-content/plugins/event-espresso-core-reg/cor in /home/s1/html/wp-content/plugins/event-espresso-core-reg/core/helpers/EEH_Parse_Shortcodes.helper.php on line 97

The code that is breaking is:

// now we need to loop through the ticket list and send data to the EE_Parser helper.
foreach ($data->tickets as $ticket) {
$tktparsed .= $this->_shortcode_helper->parse_ticket_list_template(
$template,
$ticket[‘ticket’],
$valid_shortcodes,
$this->_extra_data
);
}


Josh

  • Support Staff

February 4, 2019 at 7:03 pm

Hi,

May I ask were there any tickets related to that event deleted? The code expects there to be a ticket, but the related ticket seems to be missing from the database (specifically the _esp_ticket table).


Matt Sayre

February 4, 2019 at 7:35 pm

The goal is to move the registrant from one time slot, to another time slot, in the same event. Since Attendee Mover won’t facilitate this directly, the work around is to move registrant to another event, then back to the original event at that new time slot. The problem with the work around however is that we can’t seem to send the registration confirmation email…


Josh

  • Support Staff

February 4, 2019 at 7:59 pm

Does that mean your answer is “no”? It sounds like you’ll need to make a ticket for each time slot (or datetime) within the event to accomplish your goal. This way, when you get to step 2 of the Attendee Mover process, you’ll select the other ticket.

Each ticket can be assigned to a specific timeslot which will allow for moving attendees from one time slot to another one.


Matt Sayre

February 6, 2019 at 9:44 am

Hey Josh, totally agree with what you are describing as the ideal workflow. That generally is broken in our experience. Have another ticket going with that issue, related to Attendee Mover. Sorry should have referenced that before, here is the support ticket infos https://eventespresso.com/topic/http-500-error-using-attendee-mover/


Josh

  • Support Staff

February 6, 2019 at 9:59 am

Hi,

May I ask what’s broken about requiring a specific ticket for a specific datetime? I’m not sure how else you’re going to enforce registration limits for each datetime, or even assign a registration to a datetime. The one way to assign a registration to a datetime is through a ticket.


Tony

  • Support Staff

February 6, 2019 at 10:00 am

Hi Matt,

Can you post a screenshot of the event editor on the original event? I want to see the datetime & ticket setup for that event.

https://eventespresso.com/wiki/troubleshooting-checklist/#screenshots

The problem from the other ticket is you are moving the registration to the exact same ticket (the registrations ticket ID === new ticket ID) which is why the exception is thrown, yes the exception is currently broken, but… as mentioned an error would still be thrown in that case regardless.

So I’d like to check how you have the tickets/datetimes set up so we can investigate further for this use case for this.


Matt Sayre

February 6, 2019 at 10:45 am

Here is the screenshot of the event in question, Event Tickets & Datetimes.
https://pasteboard.co/HZW9Cll.jpg

There are four sessions for this one event:
Session One 3:00pm – 4:00pm
Session Two 4:00pm – 5:00pm
Session Three 5:00pm – 6:00pm
Session Four 6:00pm – 7:00pm


Tony

  • Support Staff

February 6, 2019 at 11:31 am

The other ticket relates to an exception being thrown when you try to move registration to the same ticket it is already on.

Using your example from above, I can use the attendee mover to move a registration from the Session One ticket, to the Session Two ticket, then again from Session 2 to Session 3 if needed, without any problems.

With the setup above you have separate tickets for each session, each of those tickets will have their own unique ID so the only way to get the error mentioned in other ticket is if you selected a registration that was on the Session One ticket and then on Step 2 of the attendee mover add-on you selected that same Session One ticket again.

From your other thread:

if ($TKT_ID === $existing_ticket_ID) {
    throw new InvalidFormSubmissionException(....)
}

‘Broken’ exception or not, $TKT_ID is the ID of the ticket you just selected in step 2, $exisiting_ticket_ID is the ID of the ticket that is currently assigned to the registration your are moving, === is exactly equal to.

Meaning $TKT_ID === $existing_ticket_ID in English is, ‘if the new ticket ID is exactly the same as the existing ticket ID’, then throw an error, so we will always throw an error at that point and whilst it may be handled a little more gracefully in the future, it will basically still show that same error in some form.

With the above setup, there should be no need to move a registration to another event, then back to the original event, just to move that registration from one Session (ticket) to another.

Are you 100% sure you are selecting the correct session when moving the registration? Meaning you are selecting a ticket other than the ticket they are on?

—-

With regards to this ticket, something odd is going on with the above in that is has a registration but no ticket assigned to it.

Based on the above, I’m assuming you have moved that registration from the above event, to another, then back to the original event again?

Did you make any changes to the tickets available on that event in between that time or was it done in essentially one long step?


Matt Sayre

February 10, 2019 at 12:20 pm

Hi Tony and Josh, the other EE support ticket has been resolved with an update to \eea-attendee-mover\form\SelectTicket.php as advised, thank you for that solution.

The issue with ‘Resend Registration Email’ remains an active issue for us. My understanding is that no changes to the tickets were made, as you noted the registration session move and notification email attempt was essentially done as one long step.

We are seeing this (HTTP 500 when attempting to resend confirmation email) with a couple of different registration:

https://thefootballopening.com/wp-admin/admin.php?page=espresso_registrations&action=resend_registration&_REG_ID=18703&redirect_to=view_registration&resend_registration_nonce=fc0604cde4

https://thefootballopening.com/wp-admin/admin.php?page=espresso_registrations&action=resend_registration&_REG_ID=18725&redirect_to=view_registration&resend_registration_nonce=fc0604cde4


Tony

  • Support Staff

February 11, 2019 at 6:21 am

We can’t view those registrations as they are hosted on your site but have both of those registrations been moved using the attendee mover?


Matt Sayre

February 11, 2019 at 8:22 am

Yes, both of the registrations in question have been moved by Attendee Mover.

I understand that you’re not able to see the registration, sharing for clarity on what specific http request is being made that triggers the error.


Matt Sayre

February 12, 2019 at 9:48 pm

Hi Tony, what are our next steps for troubleshooting the HTTP 500 error we are seeing when initiating a ‘Resend Registration Email’ for a registration that has been moved by Attendee Mover?


Tony

  • Support Staff

February 18, 2019 at 1:44 pm

Hi Matt,

Apologies for the delay, I’ve been working through trying to reproduce the situation that would cause this but so far have been unable to.

Can I take a look in the admin at the registration in question?

If so you can send temp login details using this form:

https://eventespresso.com/send-login-details/

I’d also like to add some code to the site so I can view some details on the registration and its line items, to do that I’ll need FTP access to the site, or if you’d prefer to install Debug Bar with Debug Bar Console I can use that.


Matt Sayre

February 19, 2019 at 5:11 pm

Thank you for the update. Accounts have been created and submitted.

Thanks again.


Tony

  • Support Staff

February 20, 2019 at 6:45 am

Hi Matt,

Thank you for the accounts, with those I was above to narrow down the problem and have applied a temporary patch to your version of Event Espresso which should allow the email to send.

Normally I’d test the change, I’m not going to test the change on your site myself as I don’t want to trigger unnecessary emails to yourself/the user but I reproduced locally and patched my version to work, then applied the same to yours so if you do run into an issue when you resend the email please do let me know (I’ll need the full error if you get one).

I’ve created a ticket for us to investigate this further and see what we can do. Just to note the problem is from having cancelled registrations from the same datetime (and so same event) as the current registration AND using the [TICKET_LIST]/[RECIPIENT_TICKET_LIST] shortcode in the ‘Main content’ of a message template (which is what your custom Registration Approved template does).

The support post ‘HTTP 500 error when clicking 'Resend Registration Email'’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso