I have a page

I have a page http://dev.rgbdesignuk.com/memorial/test-test/
the section stories is using a comments form to allow users to leave a story about the person it was working perviously but it doesn't now seem to work I need some advice on how to fix this can any one help?

  • Imperative Ideas

    Hey Jade,

    Any time you see an error that follows this form:
    Uncaught TypeError: Object [object Object] has no method 'jPlayerInspector'

    It usually means you have jQuery registered more than once and it's screwing up every jQuery plugin on the site.

    Sure enough, right there in your source we see this:

    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
    <script src="http://dev.rgbdesignuk.com/wp-content/themes/canvas-child/memorials/js/jquery.fancybox.js"></script>
    <script src="http://dev.rgbdesignuk.com/wp-content/themes/canvas-child/memorials/js/helpers/jquery.fancybox-media.js"></script>
    <script src="http://dev.rgbdesignuk.com/wp-content/themes/canvas-child/memorials/js/jquery.fancybox.pack.js"></script>
    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
    <script src="http://dev.rgbdesignuk.com/wp-content/themes/canvas-child/memorials/js/jquery.flexslider-min.js"></script>
    <script src="http://dev.rgbdesignuk.com/wp-content/themes/canvas-child/memorials/js/jquery.jplayer.min.js"></script>
    <script src="http://dev.rgbdesignuk.com/wp-content/themes/canvas-child/memorials/js/jplayer.playlist.min.js"></script>

    So you have jQuery registered twice, both times at Google. Typically, if you want to use a CDN copy, you check for jQuery first, then remove the official version and replace it. You also want to include jQuery migrate, since the latest jQuery breaks old scripts.

    My standard approach in functions.php looks like this:

    /**
     * Non-Local jQuery
     */
    
    if (!is_admin()) add_action("wp_enqueue_scripts", "cdn_jquery_enqueue", 99);
    function cdn_jquery_enqueue()
    { // with migrate!
        wp_deregister_script('jquery');
        wp_register_script('jquery', "//code.jquery.com/jquery-1.11.0.min.js", false, null);
        wp_register_script('jquery-migrate', "//code.jquery.com/jquery-migrate-1.2.1.min.js", false, null);
        wp_enqueue_script('jquery');
        wp_enqueue_script('jquery-migrate');
    }

    So you need to do two things:

    1. Find out what is registering jQuery and kill it
    2. Use the right code in your functions.php
    3. Profit.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.