Events Made Easy Forums Bug fixed or feature request implemented Missing Records in wp_eme_bookings table

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #60620
    Anonymous
    Inactive

    We’ve discovered gaps in the sequence of IDS in the bookings table. We’re wondering how this could happen.

    As we understand the process: The web user completes a form and EME stores the data in various table: wp_eme_people, wp_eme_answers, wp_eme_booking are the main ones that we are interested in.

    On our site we have a hook on the RSVP process. We want to transfer the information about the person and the event into HubSpot. Our hook is very simple, it obtains the booking ID and queues an action to be performed in 10 seconds.

    Recently we have found, when our action is called, that the booking is missing. No booking, no answers. In our setup, the user doesn’t make a payment at the time of booking, so there are no payment records for us to look at.

    We are wondering what could trigger the removal of records from the database. Do you have any ideas?

    #60621
    Anonymous
    Inactive

    We found this code in eme_rsvp.php around lines 978-992.

    		  if ($booking_id) {
    			  // now upload the wanted files. If uploading fails, show that and delete the booking
    			  $upload_failures = eme_upload_files($booking_id,"bookings");
    			  if ($upload_failures) {
    				  // uploading failed, so show why and delete the booking
    				  $form_html .= $upload_failures;
    				  eme_delete_booking($booking_id);
    			  } else {
    				  $booking_ids[]=$booking_id;
    				  // everything ok? So then we add the user in WP if desired
    				  // this will only do it if the booker is not logged in and his email doesn't exist in wp yet
    				  if ($event['event_properties']['create_wp_user']>0 && !$booker_wp_id && !email_exists($booker['email']) ) {
    					  eme_create_wp_user($booker);
    				  }
    			  }
    

    Our booking form includes a file-upload field, so this seems to be the most likely reason that we have occasionally lost bookings.

    We don’t know why you have chosen to delete the booking. This seems like an undesirable option. We would prefer that you advise the user to try to load the file again.

    #60622
    Franky
    Keymaster

    Asking to re-upload is not an option (that doesn’t exist in php), that’s why I delete the booking and let them retry.
    But I’ll keep this open in bugs, let me think about it … maybe I can delay the hook until done (because that’s the real issue I think: the hook happens, while the booking gets deleted upon failure).

    #60624
    Franky
    Keymaster
Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘Bug fixed or feature request implemented’ is closed to new topics and replies.
Scroll to Top