Support

Home Forums Event Espresso Premium required fields not validating

required fields not validating

Posted: January 24, 2013 at 9:32 am

Viewing 5 reply threads


Andrew MacKenzie

January 24, 2013 at 9:32 am

I have read the other posts on this issue and realize that it’s probably a conflict with jQuery or my theme being dumb… but I have tried to debug and am having no luck.

http://capitalcitycondors.org/wp2/?page_id=853&ee=1

any help would be appreciated


Josh

  • Support Staff

January 24, 2013 at 9:44 am

Hi Andrew,

I think the root of the problem is the version of jQuery is 1.9, which was released just last week. If you change that to use the version of jQuery that is shipping and tested to work with WordPress 3.5 (which is jQuery 1.8.3) this will likely fix things.

It looks like it’s a plugin that’s removing the version of the jQuery library that ships with WordPress and replacing it with its own, but that is only a guess from viewing the page source. This is only a guess, but it may be the all in one calendar plugin or the slimbox plugin. It may be another plugin too.

So what happens is the plugin does something like this:

function plugin_loads_jquery() {
  if (is_admin()) return;
  wp_deregister_script( 'jquery' );
  wp_register_script( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js');
  wp_enqueue_script( 'jquery' );
}

If you can find the plugin that is doing this, you can change it the above code to something like:

function plugin_loads_jquery() {
  if (is_admin()) return;
  //wp_deregister_script( 'jquery' );
  //wp_register_script( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js');
  wp_enqueue_script( 'jquery' );
}

The first step would be to find the plugin that is causing this, which you can do by temporarily deactivating all the plugins installed that use jQuery on the front end of the site, then test that registration page to see if the validation starts working. Then you can reactivate those plugins one by one and test until it breaks again.


Andrew MacKenzie

January 24, 2013 at 10:38 am

thanks for the quick response.

it turns out not to be a plugin issue, but a theme issue.

I disabled ALL plugins except EE and the problem still persisted.
I switched to twenty twelve and it was fine.
I am trying to find out what about my theme is loading jQuery 1.9


Josh

  • Support Staff

January 24, 2013 at 10:52 am

Hi Andrew,

It’s likely in a theme functions.php file, and the code will be very similar to what I posted above.


Andrew MacKenzie

January 24, 2013 at 10:56 am

yes, you were bang on… I found this:

function wpl_scripts_include() {
wp_deregister_script('jquery');
wp_register_script('jquery', ("http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"), false, '');
wp_enqueue_script('jquery');
wp_enqueue_script( 'tabs', get_template_directory_uri().'/tabs.js', '', '', 'footer' );
wp_enqueue_script( 'html5', 'http://html5shim.googlecode.com/svn/trunk/html5.js', '', '', '' );

}

add_action(‘wp_enqueue_scripts’, ‘wpl_scripts_include’);

I commented out the de-register and re-register and now it validates… thanks a lot for your help.


Andrew MacKenzie

January 24, 2013 at 10:58 am

oops, sorry about the poor formatting. wysiwyg editors and I don’t see eye-to-eye most of the time 😉

Viewing 5 reply threads

The support post ‘required fields not validating’ 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