• Uncaught ReferenceError: lidd_mc_script_vars is not defined
        at HTMLFormElement.<anonymous> (lidd-mc.js:95)
        at HTMLFormElement.dispatch (jquery.min.js:3)
        at HTMLFormElement.r.handle (jquery.min.js:3)

    line 95
    var cp = lidd_mc_script_vars.compounding_period;

    On calculate, so no result.

    Looks like variables are not being passed from settings page.

    Have tried re-saving options.

    Can you take a look?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter fullworks

    (@fullworks)

    OK the problem lies here
    function lidd_mc_are_scripts_required() {

    in

    if ( lidd_mc_detect_widget() || lidd_mc_detect_shortcode() ) {
    		lidd_mc_enqueue_scripts();
    	}

    And detect shortcode isn’t detecting coded shortcode built into the theme

    do_shortcode( '[mortgagecalculator]' );

    The way this function is coded it cant work.

    Maybe
    1) a function to call e.g. lidd_there_is_a_shortcode_here() that forces it
    or simpler put lidd_mc_detect_shortcode() in class and allow overbidding

    Thread Starter fullworks

    (@fullworks)

    Ok this is the way to solve this problem.

    In the template that uses do_shortcode add an action to enqueue the scripts even though they were not.

    add_action( 'wp_enqueue_scripts', 'lidd_mc_enqueue_scripts' );

    Hey Fullworks. I’m glad you were able to solve this problem for yourself. I typically direct people to the FAQ for this type of issue. I’ve included a script in the plugin to manually load the scripts.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Javascript error stopping it working’ is closed to new replies.