Support

Home Forums Event Espresso Premium HTTP 500 error using Attendee Mover

HTTP 500 error using Attendee Mover

Posted: January 29, 2019 at 11:49 pm


Matt Sayre

January 29, 2019 at 11:49 pm

Seeing HTTP 500 error with Step #3 “verify changes” to step #4, error occurs with and without Trigger Notifications set to ‘Yes’, when clicking “Next Step”.

We have EE messages Generate and send all messages set to ‘On the same request’ because wp-cron is not available on liquidweb WP hosting.

EE 4.9.73.p
AM 1.0.4p
WP 4.9.9


Matt Sayre

January 30, 2019 at 12:22 am

This reply has been marked as private.


Tony

  • Support Staff

January 30, 2019 at 3:37 am

Hi there,

Error 500 is a general error shown to visitors when something goes wrong, it usually means there has been a fatal error on the server side and that error would have been logged in the error logs.

So if you look in your hosts control panel you will usually have a section to view the logs, can you see an error from EE there?

If not, add this snippet to your wp-config.php file:

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

Then do another attendee move and the error should be logged to /wp-content/debug.log


Matt Sayre

February 2, 2019 at 12:23 pm

[29-Jan-2019 06:12:28 UTC] PHP Fatal error: Uncaught EventEspresso\core\exceptions\InvalidFormSubmissionException: The data for the “Registrations can not be moved if you select the exact same ticket that the registration already has! Please select a different ticket.” form, is either missing or was not submitted properly. in /home/s1/html/wp-content/plugins/eea-attendee-mover/form/SelectTicket.php:159

When I look at /plugins/eea-attendee-mover/form/SelectTicket.php line 159 I see:

if ($TKT_ID === $existing_ticket_ID) {
throw new InvalidFormSubmissionException(
esc_html__(
‘Registrations can not be moved if you select the exact same ticket that the registration already has! Please select a different ticket.’,
‘event_espresso’
)
);

This calls the following function in plugins\event-espresso-core-reg\core\exceptions\InvalidFormSubmissionException.php

/**
* InvalidFormSubmissionException constructor
*
* @param string $form_name
* @param string $message
* @param int $code
* @param \Exception $previous
*/
public function __construct($form_name, $message = ”, $code = 0, \Exception $previous = null)
{
if (empty($message)) {
$message = sprintf(
__(
‘The data for the “%1$s” form, is either missing or was not submitted properly.’,
‘event_espresso’
),
$form_name
);
}
parent::__construct($message, $code, $previous);
}

Note that the first parameter it’s expecting is the $form_name
instead the function in the plugin is sending the message first.
That’s why it says

The data for the “Registrations can not be moved if you select the exact same ticket that the registration already has! Please select a different ticket.” form, is either missing or was not submitted properly

So this looks to me like a bug in the plugin itself?


Tony

  • Support Staff

February 3, 2019 at 11:37 am

Hmm, ok, thank you for looking into this.

As you mentioned, the exception is invalid as is, however even after fixing it, which can be done by changing the above to this:

throw new InvalidFormSubmissionException(
    $this->slug(),
    esc_html__(
        'Registrations can not be moved if you select the exact same ticket that the registration already has! Please select a different ticket.',
        'event_espresso'
    )
);

An exception will still be thrown because the Ticket you have selected is the exact same ticket your registration is already on.

I’ll create a ticket to handle the error better but either way, the selection you are making on the attendee mover will not work. You can only move a registration onto a ticket other than the ticket it is already on.


Matt Sayre

February 10, 2019 at 12:06 pm

Thank you Tony, the code update to \eea-attendee-mover\form\SelectTicket.php did resolve this issue. We are now able to move a registrant from one time slot to another time slot, in the same event.


Tony

  • Support Staff

February 11, 2019 at 6:20 am

Great, but that’s still rather strange as the above should be thrown if you are selecting the exact same ticket the user is already on.

The support post ‘HTTP 500 error using Attendee Mover’ 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