Support

Home Forums Event Espresso Premium Registration Checkout page stuck after showing 'Unable to retrieve cart"

Registration Checkout page stuck after showing 'Unable to retrieve cart"

Posted: September 23, 2021 at 4:31 am


fuzzyminds

September 23, 2021 at 4:31 am

Hello,
We have a network of sites and we use Event Espresso on two of them. Both the sites are showing two different errors on the registration-checkout page:

1) https://informationsecurityleadership.com/scheduled-events/:
When a logged-in user gets to the registration-checkout page, fill out the registration form and hit “Proceed to Payment Options”, they see the following error:
“Your form data could not be applied to any valid registrations. This can sometimes happen if too much time has been taken to complete the registration process. Please return to the Event List and reselect your tickets. If the problem continues, please contact the site administrator.
EE_SPCO_Reg_Step_Attendee_Information – process_reg_step – 913”

2) https://mycima.net/events/certified-iso-27001-lead-implementer-course-live-online-october-2021/:
At the payment options page, when a user tries to submit a promotion code, they see the following error:
“We’re sorry, but the promotion code could not be applied because the event cart could not be retrieved.
EED_Promotions – _submit_promo_code – 800”

Info on our Environment:
We are using the latest version of both WordPress and Event Espresso with a valid license. The events we are testing for registration are LIVE and in compliance with EE documentation and payment methods are successfully integrated. We are using Cloudfront as a CDN and caching service but we have made sure to set 0 caching for the pages mentioned here: https://eventespresso.com/wiki/setup-nocache-exclusion-rules-event-espresso/

There are no errors in the debug.log file. We urgently need help in resolving these errors. We’ve already followed instructions from related threads on these errors to no avail.


Tony

  • Support Staff

September 23, 2021 at 5:30 am

Hi there,

Both of the errors you’ve referenced above point to an issue with PHP Sessions on the server.

For #1 the checkout process is pulling the registrations from the transaction linked to your current cart, which it gets using your current session. You’re getting no registrations returned from the query which on its own could be caused by a few different issues although still usually session related.

For #2 when you enter the promotion code the first step the function takes is to pull in the current cart from your session again, like this:

 $cart = EE_Registry::instance()->SSN->cart();
if ($cart instanceof EE_Cart) {
    // Do something with the cart to process the promo
} else {
    // If get to here we can't find a valid cart from the users session.
    // Throw the "We're sorry, but the promotion code could not be applied because the event cart could not be retrieved." error here.
}

My guess based on the info we have is this is from the CloudFront CDN are you load balancing through cloudfront?


fuzzyminds

September 23, 2021 at 5:46 am

Hi Tony,

Thank you for the information.
Yes, we are load balancing through Cloudfront. Is there something additional which we’d need to implement for EE to work with our current setting? If yes, then can you please recommend what? There’s not much info about it on the web.

If this is a PHP session related issue, it still is not consistent across all the plugins because other operations on the site are working as expected. Can you provide us more information on what configurations to check for PHP sessions to work correctly for EE?


Tony

  • Support Staff

September 23, 2021 at 6:04 am

Is there something additional which we’d need to implement for EE to work with our current setting?

You would need to set it up so the load balancer always sends the same session(s) to the same server, I’m not a sys admin but if I recall correctly it is called sticky sessions, or some other method to share sessions across all instances.

If User A hits Site 1 and starts a session, then the ajax request sent by Event Espresso is sent to Site 2 it will check for the session find there isn’t one and start another for that request to use.

If this is a PHP session related issue, it still is not consistent across all the plugins because other operations on the site are working as expected.

Can you provide more details as to what other those operations are, please?

WordPress itself doesn’t use PHP Sessions so just wondering what you are using to compare with it working.


fuzzyminds

September 23, 2021 at 10:48 am

Please note that we are using a single server with the load balancer. The load balancer in our environment is only a security setup and does not load balance across multiple servers so no sticky sessions etc are required. Can you let us know of all the url paths which Event Espresso takes while registering a user in an event? For e.g. we recently discovered that wp-admin/admin-ajax.php is used by EE for Ajax calls. Is there any other important path which we should whitelist?

All other operations on our site, either using php sessions or not are working as expected. That’s what I meant. However, one of the plugins called “FlickRocket” uses php sessions too and it seems to be working fine.


fuzzyminds

September 23, 2021 at 11:07 am

FYI – We’re using Stripe as the payment gateway on both sites.

Also, let us know if EE stores any kind of session info in a folder somewhere on the server.


Tony

  • Support Staff

September 23, 2021 at 12:37 pm

Please note that we are using a single server with the load balancer. The load balancer in our environment is only a security setup and does not load balance across multiple servers so no sticky sessions etc are required.

Hmm, ok, so not really a load balancer then. I can’t think of anything else that could cause this.

Can you let us know of all the url paths which Event Espresso takes while registering a user in an event?

From the single event page, or the page containing the ticket selector (if using a separate shortcode for it) you have the EE4 critical pages listed in:

Event Espresso -> General Settings -> Critical pages.

For e.g. we recently discovered that wp-admin/admin-ajax.php is used by EE for Ajax calls.

Yeah, any plugin using ajax ‘the WordPress way’ will use the above file. EE uses that to process the steps of the checkout (attendee information, payment options, promo codes etc).

I’m not aware of any other paths you would need for this.

Is there any other important path which we should whitelist?

May I ask what you are whitelisting the URLs from/on?

If you’ve whitelisted admin-ajax.php are you still getting the same issue?

If you’d like to create a temp member on the site I can test a registration with use support[at]eventespresso.com for the email and send the details over using this form:

https://eventespresso.com/send-login-details/

Also, let us know if EE stores any kind of session info in a folder somewhere on the server.

We store session details in the database, but don’t store any details on the server itself. We use the ID from the PHP Session to identify the user and that’s it, nothing else is stored within the session.


fuzzyminds

September 24, 2021 at 4:05 am

Tony, can you let us know what specific http headers EE and its add-ons use in particular to process the steps of registration?


Tony

  • Support Staff

September 24, 2021 at 4:40 am

I’m not sure I follow, we don’t use specific http headers within EE.

Can you add some more details on what you are looking into?


fuzzyminds

September 24, 2021 at 5:55 am

Our sites are purposely secured, we only forward trusted and known cookies/headers to our server. What we had to do to resolve the issues with EE is, we had to allow ALL headers without exception for the pages related to EE in order for it to work.

We were hoping your team could identify all the https headers which EE uses in order to make the checkout process work.

The support post ‘Registration Checkout page stuck after showing 'Unable to retrieve cart"’ 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