Support

Home Forums Event Espresso Premium MER unable to collect $_POST data. Receiving: Undefined index: event_id

MER unable to collect $_POST data. Receiving: Undefined index: event_id

Posted: March 5, 2015 at 11:38 am

Viewing 5 reply threads


David

March 5, 2015 at 11:38 am

EE3 3.1.37.0.P and the release before this.
MER 1.0.5
WP 4.1.1

I am trying to create a unique id using the documentation found here:
https://eventespresso.com/wiki/create-custom-registration-id/

When I attempt to grab data using $_POST[‘event_id’] or $_POST[‘num_people’] I receive an Undefined index errors like Undefined index: event_id.

It works when using single registrations. I’ve also tried a fresh install only using EE3 and MER on the twentyfifteen theme with the same error.


Dean

March 6, 2015 at 2:31 am

Hi,

MER works differently to the standard registration, due to having potential for more than one event.

Try $_SESSION (do a var_dump to see the full data in that variable).


David

March 6, 2015 at 3:05 am

Hi thanks for the reply,

Same error. var_dumps on both return NULL.

I suspected they worked differently, but the documentation mentioned it had been tested on both single and MER. As it’s a clean staging area (with only the two required EE3 plugins installed and the Twenty Fifteen theme), I can provide access to the site if it helps.


Dean

March 6, 2015 at 5:40 am

That’s odd. I added the var_dump into the my_custom_registration_id function and on the Payment overview page it correctly dumped information. Screenshot http://take.ms/OpoQP

Code being used: http://take.ms/2HY3S


David

March 6, 2015 at 7:32 am

The keys for MER are different than what is mentioned in the documentation. Either way I should have tried dumping the entire session and post.

Thank you.


Dean

March 6, 2015 at 7:48 am

No problem, glad it helped. I’ll take a closer look at the documentation and see if it needs refreshing.

Viewing 5 reply threads

The support post ‘MER unable to collect $_POST data. Receiving: Undefined index: event_id’ 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