I finally found the solution to a very long lasting issue in EE3.
The db gradually adds up orphan prices and tickets which become default prices and tickets prices when you create a new event.
The issue comes from the event-identifier field. This field has a limited length in the db. When you create an event with a long title, EE creates a default event identifier by concatenating the title and event id. When it is too long the script stops but the pricing and times are already added to the db and become orphan.
My temporary solution was to have an overnight query removing the orphan prices and times but you can get rid of this problem with the changes below.
My solutions:
In the plugin/event-espresso/includes/event-management/insert_event.php
Change near line 80:
—THIS—
if (!isset($_REQUEST[‘event_identifier’]) || $_REQUEST[‘event_identifier’] == ”){
$event_identifier = sanitize_title_with_dashes($event_name . ‘-‘ . $event_code);
}else{
$event_identifier = sanitize_title_with_dashes($_REQUEST[‘event_identifier’]) . $event_code;
}
The above fix should work, however if you update to the latest version of Event Espresso 3 (currently 3.1.37.11) you should find this prevents the additional prices from being created as we already have fixes in place to prevent this.
Viewing 3 reply threads
The support post ‘Solution to multiple Event Price and Ticket when creating new event’ 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.
Support forum for Event Espresso 3 and Event Espresso 4.