• Hi, I posted this problem on the support forum for elegant themes too, and am checking there, but I’m not sure if it’s a theme related problem, so I was wondering if anyone here might have some insight. It’s pretty urgent that I get this fixed, because I’m hoping to officially launch the site ASAP. Any help would be greatly appreciated.

    Dropdowns stopped working after I applied updates for Bad Behavior and Contact Form 7 plugins. Interestingly, my “Home” page in the “Reading” settings also changed to a different page (“Home” instead of “Welcome”) — which I did NOT do. I’ve changed the home page back to the correct one, but the problem with the menus is still the same. I’ve deactivated all of my plugins and still having the same problem.

    I was using the w3 total cache plugin with the JS minification turned off. (Everything was fine, though). I’ve disabled the plugin and the problem persists. I am using a Child theme with the latest version of JQuery, but this was not causing any problems before.

    Having a lot of trouble figuring this one out, so any ideas are greatly appreciated. I’m going to try downloading the latest version of the theme and upgrading to that to see if it makes a difference.

Viewing 15 replies - 1 through 15 (of 15 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Did you check to see whether the issue persists on another theme, like Twenty Eleven?

    Thread Starter loudliger

    (@loudliger)

    Thanks for the reply. I just checked and it does work on 2011. Maybe updating the theme will work. I’ll let you know the result.

    Thread Starter loudliger

    (@loudliger)

    It looks like the problem is my child theme — which is baffling to me, because it was working before, and just stopped out of the blue when I updated the plugins. When I revert to the original Flexible theme, the dropdowns are working. My guess is that it’s something to do with the version of JQuery I registered in functions.php — which sucks because if I have to use an earlier version of JQuery, I can’t use the tooltip I wanted to. I’m going to fiddle around for a bit and post here with the results. I’d really like to be able to use the latest JQuery.

    If anyone has any idea what CAUSED this, I’d really like to know.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    You ought to let your theme’s vendors know of this issue.

    Thread Starter loudliger

    (@loudliger)

    Thanks. I’ve posted all of this information on their support forums, so they are aware. I’m just hoping the problem is what I think it is, and that I can figure out a way to use the tooltips I wanted.

    Thread Starter loudliger

    (@loudliger)

    Ok, I fixed it by downgrading to JQuery 1.8.3 in my functions.php, which luckily still lets me use the latest version of JQuery UI and allows me to have the Accoridions and Tooltips that I want — or at least, no troubles so far. I have activated all my plugins including W3 Total Cache and Bad Behavior and Contact Form 7, and everything seems to be in working order.

    Here’s what I don’t get: why was everything working fine with the latest JQuery until I updated my plugins? Anyone have any idea?

    I sincerely hope that you are not de-registering core jQuery.

    Thread Starter loudliger

    (@loudliger)

    Sounds like that could be drastically bad, in your opinion. Please explain.

    It’s about as bad as you can get. If you de-register core jQuery, part of the WordPress admin UI will either break or will start to behave unpredictable. Plugins that rely on core jQuery will also no longer work correctly. Put it this way – de-registering core jQuery is absolutely forbidden in WPORG themes and by many commercial theme providers

    Thread Starter loudliger

    (@loudliger)

    I used

    if( !is_admin() ){

    So it doesn’t affect the admin UI. What plugins are we talking about here? I need to deregister it or I can’t use the JQuery UI functions I want.

    What plugins are we talking about here?

    Impossible to say. Make a list and use a pin to select one. Seriously – just about any plugin can rely on core jQuery. And using !is_admin() is no protection against those parts of core that also rely on jQuery.

    Do yourself a favour – do not de-register core jQuery – ever. I’ve seen this create all kinds of problems on sites. so much so that I even blogged about it last year.

    Thread Starter loudliger

    (@loudliger)

    Ok. I believe you. I haven’t run into any problems yet, but I guess that doesn’t mean I won’t. Let me see what JQuery UI feature will still work if I use the core.

    Thread Starter loudliger

    (@loudliger)

    Thanks for taking the time to help me learn. I really appreciate it. I guess using the core does work just fine. The tooltip even works. The problem before when I did it was that I was adding the effects I wanted individually, but I just had to add jquery and jquery ui.

    Thread Starter loudliger

    (@loudliger)

    Wait — scratch that. It doesn’t work at all.

    Thread Starter loudliger

    (@loudliger)

    Ok, so what am I missing here?

    This doesn’t work:

    function my_scripts_method() {
    
            wp_enqueue_script('jquery');
            wp_enqueue_script('jquery-ui-core');
    }
    
    add_action('wp_enqueue_scripts', 'my_scripts_method');

    (That or if I add the effects individually)

    But this does work:

    if( !is_admin() ){
    	wp_deregister_script('jquery');
    	wp_register_script('jquery', ("http://code.jquery.com/jquery-1.8.3.min.js"), false, '');
    	wp_enqueue_script('jquery');
    }
    if( !is_admin() ){
    	wp_deregister_script('jquery_ui_core');
    	wp_register_script('jquery_ui', ("http://code.jquery.com/ui/1.10.2/jquery-ui.min.js"), false, '');
    	wp_enqueue_script('jquery_ui');
    	wp_enqueue_style ('excite-bike', ("http://code.jquery.com/ui/1.10.2/themes/excite-bike/jquery-ui.min.css"), false, null);
    }

    Obviously I’d rather do it the right way, and I understand what you’re saying about using the core, but until I can figure it out, I’m going to have to stick with the way that has been working. Any help is appreciated. Is my code wrong? What’s the deal?

Viewing 15 replies - 1 through 15 (of 15 total)

The topic ‘Dropdown menus just stop working’ is closed to new replies.