Posted: 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? |
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? |
|
|
Hi thanks for the quick answer. 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. I will check for changing strategies but I don’t remember about them. Thanks a lot for your help |
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. |
|
|
Sorry Josh, the client postponed the sell date because of the problem. I will try you process with Health Check too. |
|
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. |
|
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. |
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. |
|
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.