Support

Home Forums Event Espresso Premium Checkout Page JS error: ee_form_section_vars is not defined

Checkout Page JS error: ee_form_section_vars is not defined

Posted: January 17, 2020 at 3:22 pm

Viewing 7 reply threads


Whiskydo

January 17, 2020 at 3:22 pm

In our website whiskydo.com we now have the problem that the user can’t proceed to the checkout. There is and erro in console in checkout process “ee_form_section_vars is not defined”. I controlled the generated HTML and in fact there isn’t the variable in the page.

We have a dev website and it doesn’t happen. I don’t understand what can be the problem. Do you have some ideas on that?


Josh

  • Support Staff

January 17, 2020 at 3:50 pm

A caching plugin could cause this. Event Espresso passes in ee_form_section_vars through the wp_localize_script() function and we’ve seen cases where caching plugins remove localized script variables.

Is there a page on whiskydo.com where tickets are on sale so I can investigate further?


Whiskydo

January 18, 2020 at 12:19 am

Hi thanks for the quick answer.
You can check a real event here https://whiskydo.com/events/la-giuria-lo-speyside-whisky-festival-in-italia-per-un-giorno/

It will ask you to register but I think that perhaps the js error will happen before the ask of registration. Let me know otherwise I will provide you a user if you don’t want to proceed a registration.
If you can register to view the all flow I will cancel your user after the resolution of the bug.

I will check for changing strategies but I don’t remember about them.

Thanks a lot for your help


Josh

  • Support Staff

January 18, 2020 at 9:26 am

It says the ticket isn’t on sale yet.

What you could do is install the Health Check plugin to help troubleshoot this. After the plugin is activated you go to WP → Dashboard → Heath Check → Troubleshooting. There you’ll Enable Troubleshooting Mode, then once that’s activated you’ll reactivate Event Espresso only via the Health Check’s Troubleshooting item in the WordPress Dashboard.

At that point, can you check to see if the issue goes away? If it does, then you reactivate other plugins one by one then check again. You can also reactivate the theme in troubleshooting mode which will could help find out if the theme is presenting a conflict.


Whiskydo

January 18, 2020 at 9:39 am

Sorry Josh, the client postponed the sell date because of the problem.
Can you check with this?
https://whiskydo.com/events/mantainance-event/

I will try you process with Health Check too.


Whiskydo

January 18, 2020 at 9:46 am

HI Josh, just removed some server cache that i had implemented in the .htaccess but unfortunately nothing changed. I opened the “test event” to everyone so you don’t need to register to see it.
Thanks a lot for your help!


Whiskydo

January 18, 2020 at 10:17 am

Hi again Josh. I found the problem. We have a script that move the js files in the footer for performance reasons. If this script is activated the var is not defined otherwhise yes. It was present just in production.
I want to investigate more on why does it happen. But for now the form is available again so we are ok.
If you have some ideas on why let me know.
Thanks a lot for your help!


Josh

  • Support Staff

January 20, 2020 at 3:54 pm

A script that moves JavaScript files to the footer can cause issues on WordPress sites because of dependancies. Sometimes you do not want a JavaScript file to load in the footer if there are dependent scripts that execute before the footer. We see things break with the Calendar add-on because of this. Regardless, the ee_form_section_vars is defined in the footer so the script that’s moving things is doing more than just moving things apparently.

A better approach may be to combine all the header scripts into one (minify and concatenate), then do the same for the footer scripts. This will likely yield a much better performance because it will result in fewer http requests and fewer total bytes. The Fast Velocity Minify plugin is one example of a plugin that does this well.

Viewing 7 reply threads

The support post ‘Checkout Page JS error: ee_form_section_vars is not defined’ 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