【问题标题】:Wordpress: no such method 'instance' for menu widget instanceWordpress:菜单小部件实例没有这样的方法“实例”
【发布时间】:2017-04-14 09:27:51
【问题描述】:

我正在使用 wordpress 4.7.3 版本。我安装了一个新主题。我在文本区域旁边的控制台中发现错误。

未捕获的错误:菜单小部件实例没有此类方法“实例”

代码是:

jQuery(function() {
    jQuery("#address").autocomplete({
        //This bit uses the geocoder to fetch address values
        source: function(request, response) {
            geocoder.geocode( {'address': request.term }, function(results, status) {
                response(jQuery.map(results, function(item) {
                    return {
                        label:  item.formatted_address,
                        value: item.formatted_address,
                        latitude: item.geometry.location.lat(),
                        longitude: item.geometry.location.lng()
                    }
                }));
            })
        },
        //This bit is executed upon selection of an address
        select: function(event, ui) {
            jQuery("#latitude").val(ui.item.latitude);
            jQuery("#longitude").val(ui.item.longitude);

            var location = new google.maps.LatLng(ui.item.latitude, ui.item.longitude);

            marker.setPosition(location);
            map.setZoom(16);
            map.setCenter(location);

        }
     });
});

问题出在哪里?

【问题讨论】:

    标签: jquery wordpress tinymce wordpress-thesis-theme


    【解决方案1】:

    我有一个确切的问题。问题是插件正在加载旧版本的 jQuery 移动插件。

    【讨论】:

    • 就是这样!尝试禁用所有插件,错误应该消失。之后,一一启用,这样你就可以发现哪个插件有冲突了
    • Jetpack 是原因。即使启用了 Jetpack 但所有 Jetpack 选项都被禁用,仍然出现相同的错误..
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-02-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-02-04
    相关资源
    最近更新 更多