Support

Home Forums Event Espresso Premium Event Registrations Purged from Database

Event Registrations Purged from Database

Posted: July 3, 2020 at 5:58 am


KBrownlee

July 3, 2020 at 5:58 am

We’ve had two customers contact us because the event registrations they placed (using offline payment methods) have disappeared from our site. They were issued with invoices to be paid, but all record of their tickets, registrations and transactions are gone. We have downloaded a database backup from our host (WPEngine) from the day after one of the registrations was made, and can confirm we see the expected data in the wp_esp_registration table. If we check this table today, the rows are missing.

There has been no unauthorised access to the site nor its hosting.

Are there any circumstances under which data would be purged by Event Espresso itself?


Tony

  • Support Staff

July 7, 2020 at 9:09 am

Hi there,

Apologies for the delayed reply.

We have one method which removes registrations on a cron schedule here:

https://github.com/eventespresso/event-espresso-core/blob/master/core/EE_Cron_Tasks.core.php#L517-L525

EE_Maintenance_Mode::instance()->models_can_query() just confirms that EE isn’t in full maintenance mode.

EED_Ticket_Sales_Monitor::reset_reservation_counts(); as the name suggests resets the ticket reservation count for expired sessions (no registrations etc removed there).

So the start is EEM_Transaction::instance('')->delete_junk_transactions();

Which is shown HERE.

The default query_args (filtered so may well have been changed by other code on the site) checks for transactions with a ‘failed’ status, note this is NOT a failed payment status, but a transaction status of failed which is set when the transaction is first created.

AND no payment objects associated with the transaction at all (invoice wont have any payment objects)

AND are older than 1 week (again 1 week by default, the value is filtered).

Any transactions its finds that match, it removes.

Then we run EEM_Registration::instance('')->delete_registrations_with_no_transaction(); found HERE.

Deletes any registrations in which a transactions doesn’t exist for (every registration within EE should be assigned to a transaction unless the above removed it).

Finally EEM_Line_Item::instance('')->delete_line_items_with_no_transaction(); found HERE. Which removes line items that belong to Transactions in which the ID doesn’t exist.

So for that cleanup job to remove the registration it all starts from the transaction and it needed to have a status of ‘TFL’ in the database (which it should not if the user made it even to the payment options step), so if you have the database saved, check the esp_registration table, find the registration in question and note the TXN_ID linked to it. What value is it?

Then check esp_transaction and check the STS_ID for the row using that TXN_ID, what is it?

You must be logged in to reply to this support post. Sign In or Register for an Account

Support forum for Event Espresso 3 and Event Espresso 4.
Documentation for EE3 and EE4
Documentation for Event Espresso 3 Documentation for Event Espresso 4

Status: publish

Updated by  Tony 3 months, 2 weeks ago ago

Topic Tags

Notifications

This topic is: not resolved
Do NOT follow this link or you will be banned from the site!
[gravityform id=80 title=false description=false ajax=false]
<div class='gf_browser_unknown gform_wrapper' id='gform_wrapper_80' ><form method='post' enctype='multipart/form-data' id='gform_80' action='/topic/event-registrations-purged-from-database/'> <div class='gform_body'><ul id='gform_fields_80' class='gform_fields top_label form_sublabel_below description_below'><li id='field_80_1' class='gfield gfield_contains_required field_sublabel_below field_description_below gfield_visibility_visible' ><label class='gfield_label' for='input_80_1' >First name<span class='gfield_required'>*</span></label><div class='ginput_container ginput_container_text'><input name='input_1' id='input_80_1' type='text' value='' class='medium' aria-required="true" aria-invalid="false" /></div></li><li id='field_80_2' class='gfield gfield_contains_required field_sublabel_below field_description_below gfield_visibility_visible' ><label class='gfield_label' for='input_80_2' >Email address<span class='gfield_required'>*</span></label><div class='ginput_container ginput_container_email'> <input name='input_2' id='input_80_2' type='email' value='' class='medium' aria-required="true" aria-invalid="false" /> </div></li><li id='field_80_3' class='gfield gfield_contains_required field_sublabel_below field_description_below gfield_visibility_visible' ><label class='gfield_label' >GDPR Agreement<span class='gfield_required'>*</span></label><div class='ginput_container ginput_container_checkbox'><ul class='gfield_checkbox' id='input_80_3'><li class='gchoice_80_3_1'> <input name='input_3.1' type='checkbox' value='I consent to have this website store my submitted information so they can respond to my inquiry.' id='choice_80_3_1' /> <label for='choice_80_3_1' id='label_80_3_1'>I consent to have this website store my submitted information so they can respond to my inquiry.</label> </li></ul></div></li><li id='field_80_4' class='gfield gform_validation_container field_sublabel_below field_description_below gfield_visibility_visible' ><label class='gfield_label' for='input_80_4' >Comments</label><div class='ginput_container'><input name='input_4' id='input_80_4' type='text' value='' autocomplete='off'/></div><div class='gfield_description' id='gfield_description_80_4'>This field is for validation purposes and should be left unchanged.</div></li> </ul></div> <div class='gform_footer top_label'> <input type='submit' id='gform_submit_button_80' class='gform_button button' value='Download Now' onclick='if(window["gf_submitting_80"]){return false;} if( !jQuery("#gform_80")[0].checkValidity || jQuery("#gform_80")[0].checkValidity()){window["gf_submitting_80"]=true;} ' onkeypress='if( event.keyCode == 13 ){ if(window["gf_submitting_80"]){return false;} if( !jQuery("#gform_80")[0].checkValidity || jQuery("#gform_80")[0].checkValidity()){window["gf_submitting_80"]=true;} jQuery("#gform_80").trigger("submit",[true]); }' /> <input type='hidden' class='gform_hidden' name='is_submit_80' value='1' /> <input type='hidden' class='gform_hidden' name='gform_submit' value='80' /> <input type='hidden' class='gform_hidden' name='gform_unique_id' value='' /> <input type='hidden' class='gform_hidden' name='state_80' value='WyJbXSIsIjBiNjdjZjkyMDUzOWUxOWY5Y2NiZjIwMzM4YjA1Mjk4Il0=' /> <input type='hidden' class='gform_hidden' name='gform_target_page_number_80' id='gform_target_page_number_80' value='0' /> <input type='hidden' class='gform_hidden' name='gform_source_page_number_80' id='gform_source_page_number_80' value='1' /> <input type='hidden' name='gform_field_values' value='' /> </div> </form> </div><script type='text/javascript'> jQuery(document).bind('gform_post_render', function(event, formId, currentPage){if(formId == 80) {} } );jQuery(document).bind('gform_post_conditional_logic', function(event, formId, fields, isInit){} );</script><script type='text/javascript'> jQuery(document).ready(function(){jQuery(document).trigger('gform_post_render', [80, 1]) } ); </script>
[i]
[i]