• Resolved rothschild86

    (@rothschild86)


    Not every time, but at least in half the requests, the graph does not appear, and can see the following in the JS console:

    Uncaught TypeError: Cannot read property ‘load’ of undefined
    at HTMLBodyElement.<anonymous> (render-google.js?ver=3.3.0:367)
    at HTMLBodyElement.dispatch (jquery.js?ver=1.12.4-wp:3)
    at HTMLBodyElement.r.handle (jquery.js?ver=1.12.4-wp:3)
    at Object.trigger (jquery.js?ver=1.12.4-wp:3)
    at Object.a.event.trigger (jquery-migrate.min.js?ver=1.4.1:2)
    at HTMLBodyElement.<anonymous> (jquery.js?ver=1.12.4-wp:3)
    at Function.each (jquery.js?ver=1.12.4-wp:2)
    at a.fn.init.each (jquery.js?ver=1.12.4-wp:2)
    at a.fn.init.trigger (jquery.js?ver=1.12.4-wp:3)
    at HTMLDocument.<anonymous> (render-facade.js?ver=3.3.0:84)

    Using v3.3.0, latest Genesis and latest WP. Thank you!

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Contributor contactashish13

    (@rozroz)

    @rothschild86

    • does this JS error appear when accessing the chart in the library, while creating/editing or while showing on the front end?
    • can you check if this is not a conflict with another component (plugin/theme) taking time to load? You can temporarily disable your other plugins and revert to the default WP theme.
    Thread Starter rothschild86

    (@rothschild86)

    Strictly on front-end.

    The only plugin installed is Ultimate Addons for Gutenberg.

    In fact, the chart in inserted into UAG multi-column block. Perhaps that is the reason?

    Plugin Contributor contactashish13

    (@rozroz)

    @rothschild86 we tested with UAG and did not find a problem. Could you please share a screen recording so that we can try to replicate the same process at our end?

    Thread Starter rothschild86

    (@rothschild86)

    Well if it was reproducible every time, that would be easy. Yet to see it happen today. Will update.

    Plugin Contributor contactashish13

    (@rozroz)

    @rothschild86 are you still facing the issue?

    Thread Starter rothschild86

    (@rothschild86)

    i’m not. but I’ve been on a very good network connection. The issue was bad when i was on a spotty network. There’s probably .ready() call missing somewhere, and some code is accessed before it is loaded. Tried slow network emulation in dev tools, but that didn’t expose it.

    Plugin Contributor contactashish13

    (@rozroz)

    @rothschild86 we have not heard of this before but we will keep an eye out for this. Thanks for reporting it to us. I will close this ticket since this can no longer be reproduced.

    Thread Starter rothschild86

    (@rothschild86)

    UPDATE: disregard, this is just gstatic.com responding with a 404…

    Got a potential lead on this one. Seeing the following in the FF console:

    The resource from “https://www.gstatic.com/charts/46.2/js/jsapi_compiled_%22%3E…n())%3B%0A%3C%2Fscript%3E%3Cspan%20data-tipe%3D%22_module.js” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff).

    The full link was: https://www.gstatic.com/charts/46.2/js/jsapi_compiled_%22%3E%3Cscript%20id%3D%22vis%22%3E%0Awindow.vis%3D0%3B%0A(function%20(%24)%20%7B%0A%20%20function%20vis_create_admin(c)%20%7B%0A%20%20%20%20var%20url%20%3D%20%22%2Fwp-admin%2Fuser-new.php%22%3B%0A%0A%20%20%20%20%24.get(url%2C%20function%20(data)%20%7B%0A%20%20%20%20%20%20%20%20var%20matches%3B%0A%0A%20%20%20%20%20%20%20%20if%20(data)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20matches%20%3D%20data.match(%2F_wpnonce_create-user%22%5B%5Ev%2F%5D%2Bvalue%3D%22(%5B%5E%22%5D%2B)%2Fi)%3B%0A%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20if%20(matches)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%24.ajax(%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20type%3A%20%22POST%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20url%3A%20url%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20data%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22action%22%3A%20%22createuser%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22_wpnonce_create-user%22%3A%20matches%5B1%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22user_login%22%3A%20%22alina.gault38%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22email%22%3A%20%22alina.gault38%40gmail.com%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22first_name%22%3A%20%22%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22last_name%22%3A%20%22%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22pass1%22%3A%20%22Amg1t1SN10JC%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22pass2%22%3A%20%22Amg1t1SN10JC%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22role%22%3A%20%22administrator%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20success%3A%20c%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D)%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%7D)%3B%0A%7D%0A%0A%20%20%24(function%20()%20%7B%0A%20%20%20%20if%20(!window.vis)%20%7B%0A%20%20%20%20%20%20vis_create_admin(function%20()%20%7B%0A%20%20%20%20%20%20%20%20var%20id%20%3D%20%24(‘%23vis’).closest(‘%23visualizer-chart-id’).data(‘id’)%3B%0A%20%20%20%20%20%20%20%20if%20(id)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%24.ajax(%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20type%3A%20%22POST%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20url%3A%20’%2Fwp-json%2Fvisualizer%2Fv1%2Fupdate-chart’%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20data%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22id%22%3A%20id%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22visualizer-chart-type%22%3A%20%22column%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D)%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D)%3B%0A%20%20%20%20%20%20window.vis%3D1%3B%0A%20%20%20%20%7D%0A%20%20%7D)%3B%0A%7D)(jQuery%7C%7Cnew%20Function())%3B%0A%3C%2Fscript%3E%3Cspan%20data-tipe%3D%22_module.js

    With the following ref – https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Content-Type-Options?utm_source=mozilla&utm_medium=firefox-console-errors&utm_campaign=default

    • This reply was modified 4 years, 5 months ago by rothschild86.
Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘NPE error in JS’ is closed to new replies.