Thread Starter
cjbos
(@cjbos)
Also this is the line that calls the function with the error
var img_sizes = t.getImgSize( img.src );
But img_sizes is not being used anywhere, I think you can just pull it out to fix the issue?
I’ve got the exact same problem!
Got the exact same when resizing on mobile devices.
Did you happen to find a fix?
Thread Starter
cjbos
(@cjbos)
I added this to the theme.php to disable the functionality until its fixed
add_action(‘wp_enqueue_scripts’, create_function(null, “wp_dequeue_script(‘devicepx’);”), 20);
find it.. sorry,
the add_action(‘wp_enqueue_scripts’, create_function(null, “wp_dequeue_script(‘devicepx’);”), 20); workds
Thank you all the reports!
Could you tell me more about the issue, so I can try to reproduce it?
- What browser did you use?
- What device did you use? Was it a Retina / HiDPi device?
- Could you post a link to a page where I could reproduce the problem?
- Do you see errors on the page, or issues with your images, or do you only see an error in your browser console?
Thank you.
Hi Jeremy,
For me it happens in the Chrome console when switching to the mobile view. The site I’m working on is not live yet, so I’ve taken a screenshot (see below). It doesn’t happen on manually resizing to a smaller view and I don’t seen any obvious errors with the images.
Screenshot
@dinho78 Thanks for the extra details! Does the error remain when refreshing that page, after you’ve turned on the dev tools panel and clicked to enable mobile mode?
Or does this only appear when enabling mobile mode the first time?
Hi Jeremy, after refreshing the error disappears. So it only seems to happen when first entering mobile mode.
Thanks for letting me know. Could anyone else confirm the same happens to them?
Hello Jerry, this is happening with me too. You Can Check my Blog. I am facing this Error with Chrome, I have not tested with another Browsers.
Yep, happening for us as well here.
Same here, also happening on my site.
On latest Safari, on a Macbook Pro (retina).
@omkar99 @ozthegreat I don’t see the error on my end, in Chrome, on a non-Retina screen.
Could you answer the questions here to tell me more about the problem?
https://ww.wp.xz.cn/support/topic/uncaught-referenceerror-width-is-not-defined-on-devicepx-jetpackjsver201630?replies=15&view=all#post-8705765
@jacksonjesse I can’t seem to reproduce, in Chrome or Safari, on a MacBook Pro Retina:
http://i.wpne.ws/grxZ
Does this happen on every page, and every page load?