elementor/elementor

Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element'

notrealdev opened this issue ยท 16 comments

Hi,
My custom post type not using Elementor (not register on admin panel) but on single post type still loads some js of elementor and have error
Uncaught TypeError: Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element'.
How to fix it?

@xttn
Please post your system info and describe how we can replicate this issue.

Yes, my Elementor setting page:
https://i.imgur.com/Jde4DJO.png

In my single custom post type, still load 4 script file ?? for what?
https://i.imgur.com/Xt1MrUN.png

Error:
https://i.imgur.com/GV4A23q.png

My system info

== Server Environment ==
    Operating System: WINNT
    Software: Apache/2.4.27 (Win32) OpenSSL/1.1.0f PHP/5.6.31
    MySQL version: 5.6.37
    PHP Version: 5.6.31
    PHP Max Input Vars: 1000
    PHP Max Post Size: 800M
    GD Installed: Yes
    Elementor Library: Not connected (cURL error 28: Operation timed out after 25000 milliseconds with 700 out of 6992 bytes received)

== WordPress Environment ==
    Version: 4.9.1
    Site URL: http://elementor.dev
    Home URL: http://elementor.dev
    WP Multisite: No
    Max Upload Size: 800 MB
    Memory limit: 256M
    Permalink Structure: /%postname%/
    Language: en-US
    Timezone: 0
    Debug Mode: Active

== Theme ==
    Name: Elementor dev
    Version: 1.0
    Author: xttn
    Child Theme: No

== User ==
    Role: administrator
    WP Profile lang: en_US
    User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36

== Active Plugins ==
    Elementor
        Version: 1.8.12
        Author: Elementor.com


== Debug ==
    Errors: 
        TypeError: Cannot read property 'pageYOffset' of undefined
            at http://elementor.dev/wp-admin/load-scripts.php?c=1&load%5B%5D=underscore,shortcode,utils,jquery-core,jquery-migrate,backbone,wp-util,wp-backbone,media-models,moxiejs,plupload,wp-plupload,jqu&load%5B%5D=ery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable&ver=4.9.1 - 12:30811
            2017-12-26 14:27 +00:00
            x 3 times

        TypeError: Cannot read property 'cid' of undefined
            at http://elementor.dev/wp-content/plugins/elementor/assets/js/editor.min.js?ver=1.8.9 - 2:180023
            2017-12-08 13:20 +00:00

        ViewDestroyedError: View (cid: "view3891") has already been destroyed and cannot be used.
            at http://elementor.dev/wp-content/plugins/elementor/assets/lib/backbone/backbone.marionette.min.js?ver=2.4.5 - 22:19954
            2017-12-08 13:20 +00:00

        ViewDestroyedError: View (cid: "view8428") has already been destroyed and cannot be used.
            at http://elementor.dev/wp-content/plugins/elementor/assets/lib/backbone/backbone.marionette.min.js?ver=2.4.5 - 22:19954
            2017-12-08 13:14 +00:00

        ViewDestroyedError: View (cid: "view6511") has already been destroyed and cannot be used.
            at http://elementor.dev/wp-content/plugins/elementor/assets/lib/backbone/backbone.marionette.min.js?ver=2.4.5 - 22:19954
            2017-12-08 13:05 +00:00

        TypeError: Cannot read property 'cid' of undefined
            at http://elementor.dev/wp-content/plugins/elementor/assets/js/editor.min.js?ver=1.8.9 - 2:180023
            2017-12-08 12:54 +00:00

        ViewDestroyedError: View (cid: "view5959") has already been destroyed and cannot be used.
            at http://elementor.dev/wp-content/plugins/elementor/assets/lib/backbone/backbone.marionette.min.js?ver=2.4.5 - 22:19954
            2017-12-08 12:53 +00:00

        ViewDestroyedError: View (cid: "view5991") has already been destroyed and cannot be used.
            at http://elementor.dev/wp-content/plugins/elementor/assets/lib/backbone/backbone.marionette.min.js?ver=2.4.5 - 22:19954
            2017-12-08 12:53 +00:00

        TypeError: Cannot read property 'style' of undefined
            at http://elementor.dev/wp-admin/js/editor.min.js?ver=4.9.1 - 1:694
            2017-12-05 13:16 +00:00
            x 2 times

        ViewDestroyedError: View (cid: "view597") has already been destroyed and cannot be used.
            at http://elementor.dev/wp-content/plugins/elementor/assets/lib/backbone/backbone.marionette.min.js?ver=2.4.5 - 22:19954
            2017-12-03 15:09 +00:00

Please update to last version 1.9.2
and check.

also if this repeats on all pages or a specific page?

Thank you, version 1.9.2 still load Awesome css on single post type no using Elementor ๐Ÿ˜„

<link rel="stylesheet" id="font-awesome-css" href="http://elementor.dev/wp-content/plugins/elementor/assets/lib/font-awesome/css/font-awesome.min.css" type="text/css" media="all">

Add new page ( example: page A ) and edit page A with Elementor, then Publish page ( without widget ), i got this error on single page A

Uncaught TypeError: Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element'.

Hello, I have the same problem. Mobile menu doesn't work.

frontend.min.js?ver=1.9.2:2 Uncaught TypeError: Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element'. at Object.getCurrentDeviceMode (frontend.min.js?ver=1.9.2:2) at u (frontend.min.js?ver=1.9.2:2) at HTMLDocument.init (frontend.min.js?ver=1.9.2:2) at i (jquery.js?ver=1.12.4:2) at Object.fireWith [as resolveWith] (jquery.js?ver=1.12.4:2) at Function.ready (jquery.js?ver=1.12.4:2) at HTMLDocument.K (jquery.js?ver=1.12.4:2)

I have the same issue in version 1.9.2

A fix was already merged, so should be out in next version.

Fixed in v1.9.3

pkjc commented

I'm getting this error in Elementor v2.0.6 and it seems like it is blocking the page load. Is there something I can do to fix this?

My system info:

`== Server Environment ==
Operating System: Linux
Software: Apache
MySQL version: 5.6.38
PHP Version: 5.6.35
PHP Max Input Vars: 1000
PHP Max Post Size: 32M
GD Installed: Yes
Write Permissions: All right
Elementor Library: Connected

== WordPress Environment ==
Version: 4.9.5
Site URL: http://dev.lssunrooms.com
Home URL: http://dev.lssunrooms.com
WP Multisite: No
Max Upload Size: 32 MB
Memory limit: 256M
Permalink Structure: /%year%/%monthnum%/%day%/%postname%/
Language: en-US
Timezone: 0
Debug Mode: Inactive

== Theme ==
Name: OceanWP Child
Version: 1.0
Author: Nick
Child Theme: Yes
Parent Theme Name: OceanWP
Parent Theme Version: 1.5.10
Parent Theme Author: Nick

== User ==
Role: administrator
WP Profile lang: en_US
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36 OPR/52.0.2871.40

== Active Plugins ==
Addons for Elementor
Version: 1.5.4
Author: Livemesh

Bulk add terms
	Version: 2.0.4
	Author: Sohan Zaman

Categories to Tags Converter Importer
	Version: 0.5
	Author: wordpressdotorg

Duplicator
	Version: 1.2.34
	Author: Snap Creek

Elementor
	Version: 2.0.6
	Author: Elementor.com

Gravity Forms
	Version: 2.2.6.5
	Author: rocketgenius

Gravity Forms Webhooks Add-On
	Version: 1.1.5
	Author: rocketgenius

Ocean Extra
	Version: 1.4.10
	Author: OceanWP

Regenerate Thumbnails
	Version: 3.0.2
	Author: Alex Mills (Viper007Bond)

Relevanssi
	Version: 4.0.7
	Author: Mikko Saari

Search Everything
	Version: 8.1.9
	Author: Sovrn, zemanta

Simple Custom CSS and JS
	Version: 3.15
	Author: Diana Burduja

Site Reviews
	Version: 2.14.0
	Author: Paul Ryley

Smart Slider 3
	Version: 3.2.14
	Author: Nextend

Toolset Layouts
	Version: 2.2
	Author: OnTheGoSystems

Toolset Maps
	Version: 1.4.2
	Author: OnTheGoSystems

Toolset Types
	Version: 2.2.23
	Author: OnTheGoSystems

Toolset Views
	Version: 2.5.2
	Author: OnTheGoSystems

WP File Manager
	Version: 2.4
	Author: mndpsingh287

== Debug ==
Errors:
TypeError: Cannot read property 'html' of undefined
at http://dev.lssunrooms.com/wp-content/plugins/elementor/assets/js/editor.min.js?ver=2.0.5 - 2:79706
2018-04-13 12:45 +00:00
x 2 times

	TypeError: Cannot read property 'id' of undefined
		at http://dev.lssunrooms.com/wp-content/plugins/elementor/assets/lib/select2/js/select2.min.js?ver=4.0.5 - 1:7974
		2018-04-11 17:39 +00:00

	TypeError: Cannot read property 'on' of null
		at http://dev.lssunrooms.com/wp-content/plugins/elementor/assets/js/editor.min.js?ver=2.0.4 - 2:82557
		2018-04-11 15:56 +00:00

	TypeError: Cannot read property 'style' of undefined
		at http://dev.lssunrooms.com/wp-admin/js/editor.min.js?ver=4.9.5 - 1:694
		2018-04-11 15:56 +00:00

	TypeError: Cannot read property 'query' of null
		at http://dev.lssunrooms.com/wp-content/plugins/elementor/assets/lib/select2/js/select2.min.js?ver=4.0.5 - 1:59580
		2018-04-11 03:49 +00:00

	TypeError: Cannot read property 'errors' of undefined
		at http://dev.lssunrooms.com/wp-content/plugins/elementor/assets/js/editor.min.js?ver=2.0.4 - 2:132648
		2018-04-11 01:39 +00:00
		x 10 times

	TypeError: Cannot read property 'id' of undefined
		at http://dev.lssunrooms.com/wp-content/plugins/elementor/assets/lib/select2/js/select2.min.js?ver=4.0.5 - 1:7974
		2018-04-10 18:34 +00:00

	TypeError: Cannot read property 'errors' of undefined
		at http://dev.lssunrooms.com/wp-content/plugins/elementor/assets/js/editor.min.js?ver=2.0.4 - 2:132648
		2018-04-10 18:27 +00:00
		x 5 times`

Am experiencing the same error on my mobile app code, i cant proceed to my javascript phase, the code is listed below... please help me out

<title>Mini App</title>

<style>
  
  body {
    overflow: hidden;
    margin:0;
    background: lavender;
  }
  h2{
    text-align: center;
    margin-bottom: 20%;
    
  }
  
  div.user-photo {
    width: 150px;
    height: 150px;
    margin: 1em auto;
    background: #fff;
  }
  
  div.details {
    font-size: 2.3em;
    margin: 2.5em 0.2em 0.2em 0.2em;
    color: #fff;
    padding: 1.1em;
    min-height: 6em;
    background-color: #6200ee;
  }
  .user-photo{
  }
  
  footer {
    width: calc(100% - 2em);
    z-index: 500;
    position: absolute;
    bottom: 0;
    overflow: hidden;
    display: flex;
    justify-content: space-between;
    margin: 0 1em;
    color: white;
  }

  
  footer button.mdc-icon-button {
    margin: 0.5em;
    color:#ffffff;

  }
  
</style>

Adesina Oluwaseun

placeholder.com
FAVOURITE LIKE BIRTDATE <script> const notify = (msg) => { const toastr = document.querySelector('.messages'); if(!toastr) return;
    toastr.textContent = msg;
    if(!toastr.classList.contains('on')) {
      toastr.classList.add('on');
    }
  };
  
  const clearNotice = () => {
    const toastr = document.querySelector('.messages');
    if(!toastr) return;
    
    toastr.textContent = '';
    toastr.classList.remove('on');
  };
  
  const displayUserPhotoAndName = (data) => {
    if(!data) return;
    
    // add your code here

    clearNotice();
  };
        
  const getAUserProfile = () => {
    const api = 'https://randomuser.me/api/';
    
    // make API call here
    
    notify(`requesting profile data ...`);
  };
  
  const startApp = () => {
    // invoke the getAUserProfile here
  };

  startApp();
</script>
<title>Mini App</title>

<style>
  
  body {
    overflow: hidden;
    margin:0;
    background: lavender;
  }
  h2{
    text-align: center;
    margin-bottom: 20%;
    
  }
  
  div.user-photo {
    width: 150px;
    height: 150px;
    margin: 1em auto;
    background: #fff;
  }
  
  div.details {
    font-size: 2.3em;
    margin: 2.5em 0.2em 0.2em 0.2em;
    color: #fff;
    padding: 1.1em;
    min-height: 6em;
    background-color: #6200ee;
  }
  .user-photo{
  }
  
  footer {
    width: calc(100% - 2em);
    z-index: 500;
    position: absolute;
    bottom: 0;
    overflow: hidden;
    display: flex;
    justify-content: space-between;
    margin: 0 1em;
    color: white;
  }

  
  footer button.mdc-icon-button {
    margin: 0.5em;
    color:#ffffff;

  }
  
</style>

Adesina Oluwaseun

placeholder.com
FAVOURITE LIKE BIRTDATE <script> const notify = (msg) => { const toastr = document.querySelector('.messages'); if(!toastr) return;
    toastr.textContent = msg;
    if(!toastr.classList.contains('on')) {
      toastr.classList.add('on');
    }
  };
  
  const clearNotice = () => {
    const toastr = document.querySelector('.messages');
    if(!toastr) return;
    
    toastr.textContent = '';
    toastr.classList.remove('on');
  };
  
  const displayUserPhotoAndName = (data) => {
    if(!data) return;
    
    // add your code here

    clearNotice();
  };
        
  const getAUserProfile = () => {
    const api = 'https://randomuser.me/api/';
    
    // make API call here
    
    notify(`requesting profile data ...`);
  };
  
  const startApp = () => {
    // invoke the getAUserProfile here
  };

  startApp();
</script>

how to set min -height property without getting this error, failed to execute getComputedStyle on window:parameter 1 is not a type of element

Cannot read property 'substring' of undefined
how to clear this error please

It worked l, thanks.. Seems you are doing same project with me.. You can send me a mail let's collaborate. Kingugo56@gmail.com