site-kit-wp icon indicating copy to clipboard operation
site-kit-wp copied to clipboard

Uncaught TypeError: Cannot read property 'OverlayView' of undefined

Open rishnarang opened this issue 5 years ago • 1 comments

Bug Description

Installing site kit in Wordpress causes other .js file with map overlay code to break.

"object" == typeof google && (CustomMarker.prototype = new google.maps.OverlayView), CustomMarker.prototype.draw = function() {
        var e = this.div;
        if (!e) {
            e = this.div = document.createElement("div");
            var t = this.templateData.itemId;
            e.className = "mkdf-map-marker-holder", e.setAttribute("id", t), e.setAttribute("data-latlng", this.latlng);
            var a = _.template(j(".mkdf-info-window-template").html());
            a = a(this.templateData);
            var o = _.template(j(".mkdf-marker-template").html());
            o = o(this.markerData), j(e).append(a), j(e).append(o), e.style.position = "absolute", e.style.cursor = "pointer", this.getPanes().overlayImage.appendChild(e)
        }
        var i = this.getProjection().fromLatLngToDivPixel(this.latlng);
        i && (e.style.left = i.x + "px", e.style.top = i.y + "px")
    }, CustomMarker.prototype.remove = function() {
        this.div && (this.div.parentNode.removeChild(this.div), this.div = null)
    }, CustomMarker.prototype.getPosition = function() {
        return this.latlng
    },

Error: Uncaught TypeError: Cannot read property 'OverlayView' of undefined

Steps to reproduce

Go to 'https://www.andreaabroad.com/wp-content/themes/backpacktraveler/assets/js/modules.min.js?ver=5.7.2' Error: Uncaught TypeError: Cannot read property 'OverlayView' of undefined

Screenshots

Additional Context

Screen Shot 2021-07-19 at 3 11 31 PM

Works after disabling site kit

Screen Shot 2021-07-19 at 3 12 17 PM Screen Shot 2021-07-19 at 3 12 38 PM

Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance criteria

Implementation Brief

Test Coverage

Visual Regression Changes

QA Brief

Changelog entry

rishnarang avatar Jul 19 '21 22:07 rishnarang

@rishnarang All support for the Site Kit plugin is provided on our WordPress.org support forum. If you create a new topic there, we'd be happy to take a look and help you troubleshoot. Thanks!

mxbclang avatar Jul 20 '21 13:07 mxbclang