2

i am using wordpress 4.7.3 version. I installed a new theme. I find an error in the console next to a textarea.

Uncaught Error: no such method 'instance' for menu widget instance

the code is:

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);

        }
     });
});

Where is the problem?

Matteo Enna
  • 1,285
  • 1
  • 15
  • 36

1 Answers1

3

I had an exact problem. The problem was that a plugin was loading an old version of jQuery mobile plugin.

ThemeFuzz
  • 31
  • 3
  • That was it! Try disabling all your plugins and the error should dissapear. After that, enable them one by one so you can discover which plugin is in conflict – gtamborero Apr 17 '18 at 09:52
  • Jetpack is the reason. Still same error even Jetpack is enabled but all Jetpack options are disabled.. – ErTR Jul 02 '18 at 23:06