Support

Home Forums Event Espresso Premium Registration information is doubled

Registration information is doubled

Posted: August 10, 2012 at 10:13 pm

Viewing 10 reply threads


mcote

August 10, 2012 at 10:13 pm

I’ve seen this a couple of times, and yet I do not know how to duplicate this issue. I have registered to an event and for some reason the field information appears twice but the values in the fields are unique. Here is a print screen.
enter image description here

The Prénom “asdf” is from some test I had previously made with this event. What I did in this example is add a registration for Bob Test. Why and where does this asdf come from? Before registering Bob Test to this event, I had no participants registered to event ID #111-502…… Help please, this has also happened to other registrants in my database.


Sidney Harrell

August 11, 2012 at 12:43 am

If you can take a look in the wp_events_answer table and look for the attendee_id for Bob Test and see if it is the same attendee_id for asdf asf, that might help narrow down the problem.


mcote

August 11, 2012 at 7:19 am

You are correct, the attendee_id is the same for Bob Test and asdf asf. Can I simply delete the unwanted records from this table? Do I need to delete those ID’s in other EE tables?

Do you have an idea why this type of situation occurs?

The interesting thing is that the registration ID for asdf asf is in this format 4ea3a6c7284052.98956803 whereas the one for Bob Test is 111-5025d4319b3bd. Is it because the deletion didn’t work well in previous versions?


mcote

August 11, 2012 at 8:11 am

Maybe it simply has something to do with the next numbering being assigned to users when they register. If it’s the case, I could manually push that next number greater than my last attendee_id number in order to avoid duplication. Is it possible to do that?


Sidney Harrell

August 13, 2012 at 12:51 pm

The id field in the attendee table should be tagged as UNIQUE and AUTO-INCREMENT in the db, so it shouldn’t be able to duplicate that.
Did you delete that test attendee? It could be that the attendee deletion function is not deleting the data from the answers table like it should.
heading into that code, be back soon….


Sidney Harrell

August 13, 2012 at 10:28 pm

Hey,
Sorry for taking so long, in the file includes/admin-reports/event_list_attendees.php, starting at line 12, should be changed to:

if (!empty($_POST['delete_customer'])) {
    if (is_array($_POST['checkbox'])) {
        while (list($key, $value) = each($_POST['checkbox'])):
            $sql = "DELETE FROM " . EVENTS_ATTENDEE_TABLE . " WHERE id = '%d'";
            $wpdb->query($wpdb->prepare($sql, $key));
                            $sql = "DELETE FROM " . EVENTS_ATTENDEE_META_TABLE . " WHERE attendee_id = '%d'";
                            $wpdb->query($wpdb->prepare($sql, $key));
                            $sql = "DELETE FROM " . EVENTS_ATTENDEE_COST_TABLE . " WHERE attendee_id = '%d'";
                            $wpdb->query($wpdb->prepare($sql, $key));
                            $sql = "DELETE FROM " . EVENTS_ANSWER_TABLE . " WHERE attendee_id = '%d'";
                            $wpdb->query($wpdb->prepare($sql, $key));
        endwhile;
    }
    ?>

That will be in the next update, but you can manually change it right now. That will prevent the error from occurring moving forward, but you may have to do some manual db row pruning if you see the effects of past errors.
Thanks.


mcote

August 14, 2012 at 8:19 pm

Thanks Sidney for the code, but I just want to make sure I understand the code well. It seems this forum converted some values incorrectly. If I replace > by > and %d by $del_id will I have the correct code?


mcote

August 14, 2012 at 8:20 pm

Thanks Sidney for the code, but I just want to make sure I understand the code well. It seems this forum converted some values incorrectly. If I replace > by > and %d by $del_id will I have the correct code?

  • This reply was modified 12 years, 2 months ago by mcote. Reason: Forum chews the code


mcote

August 14, 2012 at 8:35 pm

Here is the final outputCode


mcote

August 16, 2012 at 4:45 pm

Sidney, I happened to test the delete functionality today with the new code you posted and the deletions did not work. The tables I have in my database do not end with _TABLE

For example you have EVENTS_ATTENDEE_TABLE but in my database I have EVENTS_ATTENDEE, is this normal?


Josh

  • Support Staff

August 17, 2012 at 8:06 am

Yes, that’s normal. EVENTS_ATTENDEE_TABLE will connect to the table named events_attendee.

Viewing 10 reply threads

The support post ‘Registration information is doubled’ 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