This topic has 6 replies, 3 voices, and was last updated 10 years by Abe.

  • Author
  • #10085

    I’m running into Javascript (Jquery) issues on a site I’m building for a client.

    Under the JavaScript Console we get the Error “Uncaught TypeError: Object [object Object] has no method live.

    This seems from I’ve read to be a deprecated command after Jquery 1.9. Which is causing JS to stop executing scripts on the page. One of the plugins we have written specifically for the site uses jquery 2.x and I’m pretty sure it’s not working due to the errors. If we disable the theme the plugin works perfectly.

    The errors are found in functions.php in the lost password section, and custom-bp-functions under the buddpress members widget section.

    Thank you very much for your assistance.

    Wondering what I can do to fix the problem.

    #10184

    I haven’t heard anything back from Support.

    After digging into the theme, I’ve found that SweetDate is using deprecated jquery commands such as .live in the forgot password functionality, which is broken in 2.3.1. This is also being used in a couple of the buddypress widgets.

    Unless those functions get re-written using on. instead of live. the theme doesn’t break my custom plugins which use jquery 2. The version of Foundation included in sweet-date appears to use jquery 1.9 but the theme uses 1.7 commands.

    #10268
     SQadmin
    Keymaster

    Hello, sorry for the delay. We replaced the “live” function wih the “on” functions
    Replace this files with the content from the links:
    wp-content\themes\sweetdate\custom_buddypress\bp-functions.php
    with
    https://archived.seventhqueen.com/files/bp-functions.txt

    wp-content\themes\sweetdate\functions.php
    https://archived.seventhqueen.com/files/functions.txt

    Cheers

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #10340

    Thank you very much. That resolved the issue.

    I ran into some other deprecated commands within the included foundation framework. We were able to resolve the issues by overlaying the most recent pull of the foundation 3.2.5 assets.

    Now I’m running into this error.
    Uncaught ReferenceError: isMobile is not defined (index):673
    (anonymous function) (index):673
    l jquery-2.0.3.js:2913
    c.fireWith jquery-2.0.3.js:3025
    x.extend.ready jquery-2.0.3.js:398
    S
    For this function:

    jQuery(function () {
    if (!isMobile()) {
    jQuery(‘.kleo-bp-active-members’).hide();
    jQuery(‘.section-members’).one(‘inview’, function (event, visible) {
    if (visible) {
    var container = “.kleo-bp-active-members”;
    jQuery(container).show(0, function() {
    jQuery(container+” li”).hide().each(function (i) {
    var delayInterval = 150; // milliseconds
    jQuery(this).delay(i * delayInterval).fadeIn();
    });
    });
    }
    });
    }

    });

    Everything seems to be in working order though.

    #10566
     Abe
    Keymaster

    Hi, in our original assets/scripts/app.js we had this function

    COPY CODE
    
    function isMobile() {
    	if (
    		(navigator.userAgent.indexOf('iPhone') != -1) || (navigator.userAgent.indexOf('iPod') != -1)
    		|| (navigator.userAgent.indexOf('iPad') != -1)
    		|| ((navigator.userAgent.indexOf('Android') != -1) && (navigator.userAgent.indexOf('Mobile') != -1))
    	) {
    		return true;
    	}
    	else {
    		return false;
    	}
    }
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    #10601

    Is there a plan to update Foundation to 4 or later?

    #10748
     Abe
    Keymaster

    Hi, not right now since there are many changes in Foundation 4 that would result incompatibilities

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.

Log in with your credentials

Forgot your details?