Support

Home Forums Event Espresso Premium Spinning gear goes too long- forces users to refresh, creates transaction issues

Spinning gear goes too long- forces users to refresh, creates transaction issues

Posted: April 6, 2016 at 1:14 am

Viewing 19 reply threads


BCPTA

April 6, 2016 at 1:14 am

Hi there,
We are experiencing checkout issues on our site. http://www.bcplaytherapy.ca
The spinning gear takes a loooong time sometimes. It can go on for like 5 minutes. So users are refreshing their page, or are being told to do so. https://cloudup.com/ceR1oe2dras

When they do this, they can sometimes get through to Paypal the second or third time around that they try to pay.

But we are getting “failed” payments, “incomplete” payments, and so on in our records. And of course, frustrated users.

I did try searching this forum about this, but the cases seem specific to each site, so I couldn’t find a generic solution or common way to troubleshoot this.

When the payment does go through, it doesn’t enrol them in the course associated with the event (I realize this may have to do with LearnDash’s integration).

Also, it changes the expiry date of their membership to one year from the date of their event purchase (and again, I realize this part may have to do with a PM Pro plugin issue).

Nonetheless, we need the endless spinning wheel to stop, and we need people to not have to refresh their registration pages to make payments for event registrations.

Can you please help?

We did set up cache exclusions on WP Engine and all the instructions you have on your site for this. We sent them that link and they told us they took care of it.

Thank you for your help.

This is happening with updated versions of plugins which we are testing on our staging site here: http://bcpta.staging.wpengine.com/ (staging apparently has no cache on WP Engine)


Tony

  • Support Staff

April 6, 2016 at 4:47 am

Hi there,

The spinning cog means EE submitted an ajax request and is waiting for a response from the server, if it doesn’t get a response (or an error is thrown during the request and it returns unexpected output) then the ajax request will fail and the cog will continue to spin.

But we are getting “failed” payments, “incomplete” payments, and so on in our records. And of course, frustrated users.

Are those failed and incomplete transactions or payments?

Event Espresso -> Transactions lists your transactions, is there were you see a status of failed and incomplete?

Or do you see failed payments within a transaction – http://take.ms/2oidO (that’s an incomplete payment)

When the payment does go through, it doesn’t enrol them in the course associated with the event (I realize this may have to do with LearnDash’s integration).

Its likely an issue with LearnDash, but when the payemtn goes through, does the Registration status update to Approved?

Also, it changes the expiry date of their membership to one year from the date of their event purchase (and again, I realize this part may have to do with a PM Pro plugin issue).

We do not have an integration with PMP so I’m not sure what is happening, how are you integrating into PMP?

Nonetheless, we need the endless spinning wheel to stop, and we need people to not have to refresh their registration pages to make payments for event registrations.

If you check your servers error logs do you see any errors relating to Event Espresso? We need to narrow down the error that’s causing the ajax request to fail.

This is happening with updated versions of plugins which we are testing on our staging site here: http://bcpta.staging.wpengine.com/ (staging apparently has no cache on WP Engine)

We can’t view this because you have reCaptcha enabled but the key is invalid on that domain – http://take.ms/PxWC9 (you won’t see this when logged in)

Can you disable reCaptcha through Event Espresso -> Registration form -> Reg form settings so we can run a registration please.


BCPTA

April 6, 2016 at 8:30 pm

Hello Tony, I filled out the form to give you access to the site. I would be happy to just send you an email with some logs and screenshots but couldn’t see how I can do that here.

To answer some questions:

I disabled Captcha

We are seeing both failed transactions and payments.

People are getting ‘failed’ transactions because they’re giving up and refreshing, or navigating away from the registration page.

When they refresh, they seem to be able to register. So it’s not happening all the time. We do have some “Approved” registrations.

I have privately sent you some error logs in a plain text file. This is how to see error logs on our site: https://wpengine.com/support/how-do-i-access-the-phpapache-error-log-for-my-account/ (I sent you access)

The way the plugins are connected is as follows:

Learn Dash has an integration with Event Espresso and PM Pro.

Event Espresso has a WP User plugin.

We use PM Pro user levels to allow people to purchase discounted, member-only tickets associated with a particular role.

When they register for an event, upon the IPN firing, LearnDash is supposed to register them for the associated course. (We know it can not do the auto enrolment for free events, or if the IPN does not get sent.)

Right now we have multiple issues going on, which I realize may not all be associated with an EE4 issue:

Logged in members trying to register for an event are getting the endless spinning gear. They can be any level. I think this may be happening for non-logged in members too. Nonetheless, refreshing the registration page seems to let people register eventually, and sometimes they are doing this more than once. But then we get the “Failed” messages.

Paying members using a role with PM Pro membership features are NOT getting enrolled in courses. “Subscriber” roles are.

Paying members using a role with PM Pro membership features are having their membership renewal dates changed to be one year from the date of their event registration – so something is conflicting with EE4 registration dates and membership expiry dates.

“Subscriber” roles have no expiration dates on their logins, so expiry does not apply to them.

Right now, I need to fix the spinning gear, so that I can do more tests to make sure that when transactions go through successfully, everything else behaves correctly. Because the problem right now is we can’t get past the first step smoothly in all instances, which is the Event Espresso registration without a spinning wheel.

Once the spinning wheel is fixed, then we can test against the rest of the subsequent issues.

They are all very integrated though, as you can probably gather.


Tony

  • Support Staff

April 7, 2016 at 7:36 am

Ok, so I had a look over your error log, there’s nothing shown there that shows the cause of the problem. Theres an error log related to the datetime join from the featured post widget but it wouldn’t cause this, are you using a custom function to hook into pre_get_posts for any of your EE listings?

There’s a couple of gotchas from above that I should highlight.

We use PM Pro user levels to allow people to purchase discounted, member-only tickets associated with a particular role.

Event Espresso uses capabilities, not roles, people often use them within cap checks interchangeably but they are not the same thing. A role is a collection of capabilities, checking by role may cause unexpected results (I don’t think it’s the cause of this but it is possible)

You should check for a capability assigned to that specific role rather than the role itself.

Logged in members trying to register for an event are getting the endless spinning gear. They can be any level. I think this may be happening for non-logged in members too. Nonetheless, refreshing the registration page seems to let people register eventually, and sometimes they are doing this more than once. But then we get the “Failed” messages.

I’ve ran multiple registrations while not logged in and didn’t run into this issue, so it may only be for logged in users, although I’m not 100% sure.

Paying members using a role with PM Pro membership features are NOT getting enrolled in courses. “Subscriber” roles are.

That’s most likely an issue with LearnDash, LD just hook into steps within the registration process and setup the user on a course.

Paying members using a role with PM Pro membership features are having their membership renewal dates changed to be one year from the date of their event registration – so something is conflicting with EE4 registration dates and membership expiry dates.

If LearnDash integrates with PMP then again this is likely an issue with LD changing the dates.

“Subscriber” roles have no expiration dates on their logins, so expiry does not apply to them.

Are you using the EE4 User Integration add-on to auto create the subscribers from the registration data?

Right now, I need to fix the spinning gear, so that I can do more tests to make sure that when transactions go through successfully, everything else behaves correctly. Because the problem right now is we can’t get past the first step smoothly in all instances, which is the Event Espresso registration without a spinning wheel.

Its best to work on this on the staging server, the reason being is your going to need to activate WP_DEBUG on the site so we can view any errors thrown on the ajax request (they don’t seem to be saved in the error logs) but I also suspect that this may be caused by either the LD add-on or possible the EE4 User integration add-on conflictig with something else.

The reason I suspect this is the registration fails on the initial request, but then if you refresh or click again to procceed to payment it goes through. I suspect something is being fired on a hook, failing (which causes the ajax request to fail) then is NOT triggered again on proceed, probably because theres some form of check on say a meta value that is being set on the initial attempt then skipped.

So on the staging server can you enable WP_DEBUG and create an account I can use to run a test registration and see if I can catch the error.


BCPTA

April 7, 2016 at 10:26 pm

Hello Tony,

Login to staging is the same as what I sent you. For SFTP to our staging site, please add “-stage” (without quotations) to the end of the username I sent you for the other access. The rest of the access info should be the same. The staging site has more updated plugins. http://bcpta.staging.wpengine.com/

To answer some questions:

Roles vs. capabilities – we tested formerly and have been using EE4 User Integration to allow only our PM Pro member levels access to some tickets. We can do this with their Roles extension which gives them capabilities. Then those capabilities are set up to be allowed to buy discounted tickets when logged in, if they have those capabilities. And if we set that up in the ticket type.

Regarding:

Are you using the EE4 User Integration add-on to auto create the subscribers from the registration data?

Yes we are.

Regarding:

<blockquote>Original comment: Paying members using a role with PM Pro membership features are having their membership renewal dates changed to be one year from the date of their event registration – so something is conflicting with EE4 registration dates and membership expiry dates.

Tony’s reply: If LearnDash integrates with PMP then again this is likely an issue with LD changing the dates.

I do think there is something going between EE4 and PM Pro however, because the expiry date changes to exactly the date of an event registration for the logged in members.

I think the LearnDash problem is where they are not being enrolled in the course. The expiry dates on memberships and the enrolment into courses are separate, I would think. Curious why your hunch is that it’s a LD thing?

But of course, we have other things to rule out first, before determining this.


BCPTA

April 7, 2016 at 11:04 pm

Forgot to answer this:

Theres an error log related to the datetime join from the featured post widget but it wouldn’t cause this, are you using a custom function to hook into pre_get_posts for any of your EE listings?

I don’t know what that means. So we probably didn’t do it.

We are using a plugin that Josh made for us for adding extra users when registering more than one person in one transaction. That is in our Plugins list on our site. Here is the link
https://gist.github.com/joshfeck/8af9e821ba5bc6e55b0e

Here is how that whole conversation started, and the need for Josh’s plugin: https://eventespresso.com/topic/will-wp-users-integration-work-with-multiple-registrations-per-order/

I think I enabled WP Debug
In Wp config file I changed “false” to “true” on the debug line.


Tony

  • Support Staff

April 8, 2016 at 5:40 am

Are you using the EE4 User Integration add-on to auto create the subscribers from the registration data?
Yes we are.

So EE is just creating the roles using standard WordPress features, not PMP, so it won’t setup expiry dates for PMP when it creates the users. To do something like that you’ll need some custom development to get EE to use PMP when creating the users.

I think the LearnDash problem is where they are not being enrolled in the course. The expiry dates on memberships and the enrolment into courses are separate, I would think. Curious why your hunch is that it’s a LD thing?

Because EE4 doesn’t integrate with PMP, it does not change any of the values PMP adds to the user meta but LD may well do as it does integrate with PMP. Right now it’s just a hunch, we need to get registrations work correctly to figure out whats happening.

We are using a plugin that Josh made for us for adding extra users when registering more than one person in one transaction. That is in our Plugins list on our site. Here is the link
https://gist.github.com/joshfeck/8af9e821ba5bc6e55b0e

That code is not causing the error within the error log (it doesn’t deal with order_by) it seems this is connected to the issue with the ‘spinning cog’ that you currently have. I de-activated that plugin on staging and registrations worked.

However if I activate that plugin on a test site it works fine.

The strange part is that I then re-activated the plugin on staging to test another registration and it now works.


Tony

  • Support Staff

April 8, 2016 at 9:10 am

I’ve just done the same test on the live site (de-activated and then re-actived that plugin) and registrations now work again.

Its strange, I can’t see any reason for this to happen.

Can you run a test registration and confirm if registrations now work for you?

It should not be caching (staging does not have caching but live can) but that’s the only reason I can think this would happen.


BCPTA

April 8, 2016 at 9:02 pm

Hi Tony, I tried in on the staging site as a logged in user.

I still get the endless spinning gear.

I think the reason it may have worked for you after you deactivated and then re-activated the plugin is that technically, this is like the users currently do, where they refresh the page, and try again. Or they click the back button, and come back to it.

So I think that when you navigated away to do plugin activation/deactivation, you came back and the browser was trying the 2nd time.

It’s the 2nd time that seems to work.


BCPTA

April 8, 2016 at 9:54 pm

Also Tony, just so you know, LearnDash has an integration plugin for PM Pro. The function of this plugin is to make certain courses available to certain member levels.
We did not install this plugin because we did not need this functionality. We have members and non members signing up for events, and then getting enrolled into courses with LearnDash.

So we don’t have the need for only some of our courses to be available to members. Thus we don’t need the LD PM Pro integration.

I hope that makes sense.

My hunch is that something is not ‘firing’ with the EE4 registration, which is then not communicating the right info for the LearnDash plugin to enrol the user in the course.

The LearnDash integration with EE4 can only work if there is a payment transaction – it fires on the IPN.

So if the EE4 is not ‘firing’ the IPN, or if the refresh changes the registration code, or whatever it is, then I can see why the LD plugin wouldn’t work properly as well.

Again – just a hunch. Thinking out loud here to try to help us come to a resolution sooner.

The expiry date changing to the date of an event registration is still a mystery. I’m writing to PM Pro about their “Set Expiration Dates” plugin to sort this out.


Tony

  • Support Staff

April 11, 2016 at 11:35 am

I think the reason it may have worked for you after you deactivated and then re-activated the plugin is that technically, this is like the users currently do, where they refresh the page, and try again. Or they click the back button, and come back to it.

So I think that when you navigated away to do plugin activation/deactivation, you came back and the browser was trying the 2nd time.

I can see why you would think that, but that’s not it.

I could consistently reproduce the issue with registrations being blocked (I could not refresh the page an work through the registration at all) I was only able to complete a registration once the plugin was de-activated.

The LearnDash integration with EE4 can only work if there is a payment transaction – it fires on the IPN.

Can I ask where you got that information from?

The LearnDash add-on hooks into EE using the ‘AHEE__EE_Registration__set_status__to_approved’ hook, that does not need an IPN to be fired.

Event Espresso does not fire any IPN’s, the Payment Processor does (lets go with PayPal). The user makes a payment on PayPal and then PayPal send the IPN to your site, EE processes the IPN and applies the payment to the transactions. If the payment amount ‘complete’ the transaction, then the registration status is set to Approved, setting the registration status to approved (not the IPN but EE) then fires the ‘AHEE__EE_Registration__set_status__to_approved’ hook. However that hook is also fired whenever the registration status is set to Approved (even by the admin), so its not dependent on any IPN.

So LearnDash is dependent on the Registration being set to Approved rather than any IPNs.

So if the EE4 is not ‘firing’ the IPN, or if the refresh changes the registration code, or whatever it is, then I can see why the LD plugin wouldn’t work properly as well.

So based on the above, its likely the ‘AHEE__EE_Registration__set_status__to_approved’ isn’t being fired, but that does NOT happen on the section that is failing anyway, it happens after.

I think the reason its working is with the plugin Josh provided LD and EE4 User Integration are working nicely together, then if I run a registration it works and updates my user meta with the values LearnDash expected. When I then register onto another event again, LearnDash skips the courses because I’m already on them.

I’m going to setup a test site with LearnDash + EE4 User Integration + the above plugin and see what happens there.


BCPTA

April 11, 2016 at 9:38 pm

Hi Tony, this is what Justin from LearnDash told me himself after we had issues with the way their EE4 integration worked. For example, it didn’t enrol people when using manual registrations.

This is what Justin said:

As it stands currently, the automatic trigger for enrollment requires the IPN from EE to fire. The integration itself wasn’t built with this particular use-case/addon in scope. (that is, the manual enrollment option).
Curious as to what EE thinks about this addon and how it could function with the LD integration. With some details from them we could add it to our enhancements for EE.

Here is that thread on their forum, if you have an account to read this:
http://support.learndash.com/forums/topic/manual-registrations-not-working-with-ee4-learndash-integration/ (more is explained there)

We did then run this by you guys, and had extensive talks with Josh about it. That’s when he made the plugin for us. Well actually it was because of this: http://support.learndash.com/forums/topic/ee4-integration-not-enrolling-multiple-attendees/ (sort of – we need the user account to be created, so they could be enrolled)

And here is another issue about people remaining enrolled even if they haven’t paid or have been denied: http://support.learndash.com/forums/topic/un-enrol-users-after-denying-or-trashing-event-registrations/ (this one is unrelated to this thread, and I know this is not your responsibility to fix)

They are very unresponsive at LearnDash, and that has been a disappointing experience for us. Even worse with PM Pro. You guys have been beyond great, however, and that has gone a long way when speaking about you to others.

Anyway, my point is, LD doesn’t seem to care that their plugin causes so many issues and isn’t really integrated fully with your system. In many cases, they just don’t reply. Lately they said they put it on their road map to improve the EE4 integration though. Who knows when that will be, or what it will involve.


BCPTA

April 11, 2016 at 9:42 pm

I also tried the registration again and got the endless spinning wheel on first try.


Tony

  • Support Staff

April 12, 2016 at 11:52 am

As it stands currently, the automatic trigger for enrollment requires the IPN from EE to fire. The integration itself wasn’t built with this particular use-case/addon in scope. (that is, the manual enrollment option).

That’s not how it works, but I can see what he’s saying. Registrations created within the admin will not create a user and assign that user to the course. I fully understand the reasons behind that (our own EE4 User Integration add-on does not create users from registrations made within the admin).

However that actually has nothing to do with IPN’s

The LearnDash integration uses the Registration status updating to Approved to add the user to the course. A user can register on the front end whilst logged in and LearnDash will setup the meta data correctly for them, if they then select Invoice and do not actually make any payment, they aren’t assigned to the course (not because of the lack of payment and no IPN, but because the registration status has not updated… which is due to lack of payment, but different)

So you as the admin can actually then go into the Registration list and change the status of the registration to Approved.

Because the user created the registration themselves and everything else is set up as it should be the change of the status will en-role them onto that course. (I’ve just tested this on a new site)

That’s not the same thing as admin enrollments (which will not work) but shows its not IPN’s that update the details. IPNs update the transaction (which can also be done without any IPN’s) and a complete transaction changes the registrations status.

So anyway… I’m getting side tracked 😉

I think I have found the cause of the problem of the spinning cog on your site. On your staging site I’ve made a small edit to the plugin Josh provided previously, can you run a registration on one of the events on that site and see if it now works for you.

(Note this will not fix any of the other issues, only the spinning cog)


BCPTA

April 13, 2016 at 1:33 am

Just want you to know another person on our team tried this on the live site twice and the spinning wheel went away for her. Not sure why I still get it.


Tony

  • Support Staff

April 13, 2016 at 3:28 am

Have you tested on staging since I made the edit mentioned above?


BCPTA

April 17, 2016 at 8:26 pm

Hi Tony, yes we tested on Staging. It seems ok right now…but we are still weary.

We now have had a user get this message: https://cloudup.com/c8yIaso8jlC

This is the explanation:

“I got the message that my purchase could not be completed at this try please try again. Without refreshing or anything, I just hit “proceed to complete payment” again and I was then directed to Paypal and the payment went through. I got all the appropriate notification emails. However, my membership expiry date is April 17, 2017 and I am not enrolled in the course.”

Do you know what this message means?

You see, I have some more tests to do, but the LearnDash course enrolment seems to work when the EE4 registration goes through without these pop ups or spinning wheels. If it goes smoothly, we are now getting course enrolments. It is driving us crazy though because some things work on Staging and some things don’t. So we are also in touch with WP engine about it.

I just need to find out why this user got the message that the registration couldn’t happen at this time, and if that was the case, why she could click on “proceed to payment” anyway.

Thanks


Tony

  • Support Staff

April 18, 2016 at 11:02 am

When you click to proceed with the registration an ajax request is sent to your site to add your registration details to the database and basically setup your registration/transaction details.

This error:

https://cloudup.com/c8yIaso8jlC

Means that either something went wrong with that request, or something unexpected was returned from the ajax request, for example another plugin throwing a notice during that request will cause problems. The reason refreshing the page works is the request has done all it needed to do, but the error prevented the refresh of the page to jump to the next step automatically.

Are you able to reproduce this yourself? We’ll need the error to know what is happening.

You see, I have some more tests to do, but the LearnDash course enrolment seems to work when the EE4 registration goes through without these pop ups or spinning wheels

The spinning wheels mean that something is happening in the background, they are expected to happen but if something jumps in an does something unexpected during the action it can cause problems.


BCPTA

April 19, 2016 at 7:04 pm

No I can’t reproduce this on my side. How can we find out what that error was? Is this logged in our ‘regular’ error logs?

I de-activated Josh’s plugin on the live site, that may be why things are working now.

Should I copy paste the plugin from staging to the live site?


Tony

  • Support Staff

April 20, 2016 at 12:26 am

How can we find out what that error was? Is this logged in our ‘regular’ error logs?

It should be, but I’ve already checked and its not. However…

Should I copy paste the plugin from staging to the live site?

Yes, please do.

If you are still running the older version on live then you will continue to get the same error as before.

Viewing 19 reply threads

The support post ‘Spinning gear goes too long- forces users to refresh, creates transaction issues’ 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