Support

Home Forums Event Espresso Premium Submission issue. Pay button triggers document "leave or stay dialog" box

Submission issue. Pay button triggers document "leave or stay dialog" box

Posted: August 7, 2013 at 6:52 am


Robert Starer

August 7, 2013 at 6:52 am

I register and complete entry of card info unfortunately I get the pop up dialog to ‘stay or leave’ the page. I have to click on leave to commit registration.


Robert Starer

August 7, 2013 at 6:59 am

During this code, it fails ‘ $(‘#processing’).html(”);’
:
jQuery(document).ready(function($) {
$(‘#paypal_pro_payment_form’).validate();
$(‘#paypal_pro_payment_form’).submit(function(){
if ($(‘#paypal_pro_payment_form’).valid()){
$(‘#processing’).html(”);
//$(‘:input[name=”paypal_pro_submit”]’).attr(‘disabled’, ‘disabled’);
}
})
});


Dean

August 7, 2013 at 7:00 am

Hi Robert,

Sorry about that, we introduced that feature to help stop people from not completing a registration and overwriting there current one.

We have a fix in place for Event Espresso version 3.1.34 that will stop this from popping up when the user heads to an offsite payment gateway such as PayPal.


Robert Starer

August 7, 2013 at 7:01 am

Forgot to mention that I just updated to WP 3.6 and esspresso 3.1.34.P


Robert Starer

August 7, 2013 at 7:07 am

I’ve disabled other plugins and still occurs


Robert Starer

August 7, 2013 at 7:10 am

Dean,

How can I retrieve this fix?

Thanks


Dean

August 7, 2013 at 7:22 am

Right I see, you are using PayPal Pro, not standard. OK, I will need to re-open the ticket to look into this, we were focusing on outbound sites for the fix not onsite. Please leave this with us.


Robert Starer

August 7, 2013 at 11:03 am

My client is asking how long will it take to resolve the issues. Thanks


Josh

  • Support Staff

August 7, 2013 at 12:29 pm

Hi Robert,

I’ve triple checked and I am unable to reproduce this on my test site that’s running Event Espresso 3.1.34.P.

There may be something on your site that is creating a conflict. There was a related forum post where something similar was happening and it turned out to be there were two Google Analytics plugins running and both of them were set to track outbound link clicks. This was resolved by deactivating one of them.

https://eventespresso.com/topic/leave-the-current-page/#post-52134

I checked the thank you page on your site and it looks like there is some google analytics JavaScript being loaded, so you could try disabling any outbound link tracking if that’s set up.


Robert Starer

August 7, 2013 at 1:54 pm

Josh,

The site doesn’t contain any google plugins but that google analytics code was place there manually. It would be a shame for me to remove it because then we’d loose tracking. I will try that and see if that’s it.


Josh

  • Support Staff

August 7, 2013 at 1:59 pm

I do not think you need to remove Google Analytics entirely as that wasn’t the case with the other site. You might try using a plugin like Google Analyticator as that didn’t seem to create any conflicts.


Robert Starer

August 7, 2013 at 2:05 pm

I removed the google tracking codes and the issue still comes up.


Robert Starer

August 7, 2013 at 2:10 pm

Error is still ‘ReferenceError: EEGlobals is not defined’


Robert Starer

August 7, 2013 at 2:42 pm

Anyway to go one version back? It was working until I updated it this morning.


Josh

  • Support Staff

August 7, 2013 at 2:46 pm

Which version were you on previously?


Josh

  • Support Staff

August 7, 2013 at 2:51 pm

With the EEGlobals not defined error you’re seeing, you might try changing line 5 in /gateways/paypal_pro/paypal_pro.js to:

  • This reply was modified 10 years, 9 months ago by  Josh. Reason: code formatting


Robert Starer

August 7, 2013 at 2:52 pm

Shoot, cant find info. There’s no way to roll back?


Josh

  • Support Staff

August 7, 2013 at 2:54 pm

Did you back up the site before you updated?


Robert Starer

August 7, 2013 at 3:12 pm

3.1.33.2

So no one else is running into this problem?


Josh

  • Support Staff

August 7, 2013 at 3:17 pm

Not with PayPal Pro in Event Espresso 3.1.34. Do you have any files copied over to /wp-content/uploads/espresso/templates or /wp-content/uploads/espresso/gateways?

On line 115 of the PayPal Pro gateways paypal_pro_vars.php file there should be an “allow-leave-page” class applied to the submit button. Is that the case with your copy?


Josh

  • Support Staff

August 7, 2013 at 3:24 pm

I ran a test on your site and can see that the allow-leave-page class is missing:

<input name="paypal_pro_submit" id="paypal_pro_submit" class="submit-payment-btn" type="submit" value="Complete Purchase">

The new version of Event Espresso (3.1.34.P) has this:

<input name="paypal_pro_submit" id="paypal_pro_submit" class="submit-payment-btn allow-leave-page" type="submit" value="Complete Purchase">

If it’s loading up an older copy of the PayPal pro gateway from /wp-content/uploads/espresso/gateways that will override the current version’s updated code.


Robert Starer

August 7, 2013 at 5:51 pm

So there’s a possibility that my update this morning was not complete?


Sidney Harrell

August 7, 2013 at 7:09 pm

The update will not update files that are in uploads/espresso, such as uploads/espresso/templates and uploads/espresso/gateways. If you have a modified version of the gateway in uploads/espresso/gateways, then that version will continue to be used after an update. The advantage is that your customizations are safe, and will not be overwritten by an update. The disadvantage is that your customized files are not updated, so you will have to check whether the stock version of your customized file was updated with new or modified code, and you’ll have to update the code in your customized file by hand. You can either make notes of what changes you made to customize your file and remake those changes to the new stock files, or you can run a diff between the old and new stock files, and add those changes to your customized files.


Robert Starer

August 7, 2013 at 7:45 pm

If I remove my modified versions in the uploads, would everything be ok?


Josh

  • Support Staff

August 7, 2013 at 7:50 pm

It’s usually a good idea to deactivate the gateway first, then remove the code from /uploads/gateways, then reactivate the gateway. By removing the older code from the /uploads directory the plugin can work as expected.


Robert Starer

August 7, 2013 at 7:56 pm

Suggested steps:
1. Deactivate PayPal Payments Pro
2. Remove Upload files
3. Reactivate Paypal Payments Pro

Is that right? Should I deactivate the plugin too after I deactivate PayPal Payments Pro?


Josh

  • Support Staff

August 7, 2013 at 7:59 pm

No need to deactivate Event Espresso. The files that are breaking things are likely in /wp-content/uploads/espresso/gateways/.


Robert Starer

August 7, 2013 at 8:15 pm

Just executed changes and it’s working as expected. Thanks.

The support post ‘Submission issue. Pay button triggers document "leave or stay dialog" box’ 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