Support

Home Forums Event Espresso Premium Duplicate entry's in wp_events_member_rel table

Duplicate entry's in wp_events_member_rel table

Posted: October 2, 2015 at 1:07 am

Viewing 3 reply threads


Remco Siero

October 2, 2015 at 1:07 am

I’m having big trouble with the registration of events in EE3. I’ve the Event Espresso – Members Addon installed so members can see their subscriptions in the frontend.
But when members are subscriping to an event a multiple insert happens into the wp_events_member_rel table. Multiple inserts with a different user-id then the user-id of the member. In some cases one of the double insert has the right userid.

This is quit disturbing: It’s looks ok in the wp_events_attendee table but the wp_events_member_rel isn’t correct. This gives really stranges result in the My Events page: Members see different members into their subscriptions list.


Josh

  • Support Staff

October 2, 2015 at 7:50 am

Hi there,

I’m looking into this, and the first thing I’ll check is if this was an issue that was fixed since EE 3.1.36. The current version of EE3 is 3.1.37.5. I’ll let you know what I find.


Josh

  • Support Staff

October 2, 2015 at 8:42 am

Hi there,

It looks like there have been some customizations made to a number of the registration page templates. Have any customizations been made to the Event Espresso core plugin or the Espresso Members plugin?

If so, can you let us know which files and functions may contain customizations?


Josh

  • Support Staff

October 2, 2015 at 10:46 am

Hi Remco,

You can disregard the above reply. I found the added functions in your copy of the Event Espresso plugin on your site in /event-espresso/includes/process-registration/payment_page.php in the creatememberportal() function, which isn’t a function that the official release of Event Espresso 3 includes.

Within the function it has this block of code, twice within a few conditionals:

$add_member_to_event_sql = "INSERT INTO RS79__wp_events_member_rel (event_id, user_id, user_role, attendee_id)
		VALUES (".$event_id.", ".$user["ID"].", 'subscriber', ".$attendee_id.")";
		
$wpdb->query($add_member_to_event_sql);					

Since the member’s add-on already runs a similar insert, your added code is more than likely what’s causing the duplicate entry.

If you or someone on your team did not add the custom code, you can contact the developer that made this and the other customizations for help on this, or you can try removing the above code. This isn’t code that we developed or can support.

Viewing 3 reply threads

The support post ‘Duplicate entry's in wp_events_member_rel table’ 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