• You MUST read the Babiato Rules before making your first post otherwise you may get permanent warning points or a permanent Ban.

    Our resources on Babiato Forum are CLEAN and SAFE. So you can use them for development and testing purposes. If your are on Windows and have an antivirus that alerts you about a possible infection: Know it's a false positive because all scripts are double checked by our experts. We advise you to add Babiato to trusted sites/sources or disable your antivirus momentarily while downloading a resource. "Enjoy your presence on Babiato"

Need help from Wordpress Experts

sabs_rocks

Active member
Oct 6, 2019
238
110
43
techarea.in
Hi,

In my website, www.techarea.in for the past few days i ecountering an 404 issue in chrome console due to the below file in site :

GET https://s0.wp.com/…ontent/js/devicepx-jetpack.js?ver=201831 net::ERR_ABORTED 404

Due to this, the google tracking ( analytics ) is not working.

I have reached out to the jetpack support forums but looks like the devicepx.js is not part of the plugin for many months now which is also correct. This was verified after checking in internet. But somehow, my website is still having this code in it .

Also, i tried completely removing the plugin, clearing files at backend and purging cache. Nothing is removing the above line of code in my website.

Any suggestions to resolve this will help!

Appreciate the support !!
 
List the plugins you have on your website here.

Let's see which could be the culprit.

Perhaps you should clear cache then delete .htaccess file.
 
  • Like
Reactions: sabs_rocks
Hello @sabs_rocks ,

Seems you're using Jetpack plugin. Jetpack loads that .js file you mentioned. Many people use Jetpack but I don't recommend that to anyone. It eats up a lot of your website's resources and makes it slow in many ways. You can simply disable that plugin and use other alternatives.

Or, if you still want to keep using Jetpack on your site, please refer this article to unload that .js file:

I hope this helps. A Like would be appreciated if it did.:)
Thanks.
 
Although the link @webhugo provided certainly is a good solution, I'd want to see where exactly the problem originates. As the OP stated, the file devicepx.js is removed from JetPack.

It might have to do with Cloudflare which you use. If temporarily disabling and then enabling Cloudflare doesn't help, search through your files source codes where the function "parseJSAtOnload" is included, because it's that function that adds the javascript file to your footer.
 
  • Like
Reactions: sabs_rocks
Disable your plugins one by one check if its there
At last check your theme files, footer and header

Edit it seems your share plugin cause this.

Disable share plugin

I did that approach as suggested by Jetpack plugin creator. Disabled every plugin used ( with & without jetpack ) , still that devicepx.js was present.

For the theme files check, should i directly check the *.php files and search for the devicepx ?? OR is there other ways to check whether the code is somehow manually included in theme files ?
 
List the plugins you have on your website here.

Let's see which could be the culprit.

Perhaps you should clear cache then delete .htaccess file.

I have cleared the cache in website and also in the cloudflare configurations settings...

Removing htaccess file means, are you suggesting to create a new one ?

Below are plugins used

jetpack
Async Javascript
Fullwidth Page templates
Gonzales
LuckyWP TOC
SiteOrigins Page Builder
SG Optimizer( siteground plugin )
Tablepress
Ultimate Addons
UpdraftPlus
Vafpress Post Formats UI
Wordfence Security
WPBakery Builder
Yoast SEO
Yellow Pencil Pro
 
Hello @sabs_rocks ,

Seems you're using Jetpack plugin. Jetpack loads that .js file you mentioned. Many people use Jetpack but I don't recommend that to anyone. It eats up a lot of your website's resources and makes it slow in many ways. You can simply disable that plugin and use other alternatives.

Or, if you still want to keep using Jetpack on your site, please refer this article to unload that .js file:

I hope this helps. A Like would be appreciated if it did.:)
Thanks.

Thanks for the link but i have already tried to it, introduced the piece of code in theme php file but nothing changed. I think that solution works when the devicepx.js is actually present in jetpack.

I also now wanted to come out of jetpack, but even after deleting the plugin , the .js is still present in my website
 
Although the link @webhugo provided certainly is a good solution, I'd want to see where exactly the problem originates. As the OP stated, the file devicepx.js is removed from JetPack.

It might have to do with Cloudflare which you use. If temporarily disabling and then enabling Cloudflare doesn't help, search through your files source codes where the function "parseJSAtOnload" is included, because it's that function that adds the javascript file to your footer.

yes, i keeping that option of disabling cloudflare (and rerouting nameserver) and planning to do it at midnight to be safer and not break the site....

On the function 'parseJSOnload', can you clarify where exactly to check it or search for it ?
 
It's by the way no surprise the file cannot be found, as it is pointing to https://s0.wp.com/…ontent/js/devicepx-jetpack.js which is an invalid url, the file is actually located at https://s0.wp.com/wp-content/js/devicepx-jetpack.js

Anyway, since the script type has a prefix that is added by Cloudflare I keep thinking it has something to do with Cloudflare. Purging the cache is probably not enough, just completely disable Cloudflare temporarily. You should be able to de-activate Cloudflare in your SiteGround account.

If the file is then still present in your source code, the only way to find where it's added is searching through your files (but of course an automatic search, a code editor can do that in seconds).
 
Hi,

In my website, www.techarea.in for the past few days i ecountering an 404 issue in chrome console due to the below file in site :

GET https://s0.wp.com/…ontent/js/devicepx-jetpack.js?ver=201831 net::ERR_ABORTED 404

Due to this, the google tracking ( analytics ) is not working.

I have reached out to the jetpack support forums but looks like the devicepx.js is not part of the plugin for many months now which is also correct. This was verified after checking in internet. But somehow, my website is still having this code in it .

Also, i tried completely removing the plugin, clearing files at backend and purging cache. Nothing is removing the above line of code in my website.

Any suggestions to resolve this will help!

Appreciate the support !!
you need to remove this script from footer.php or function.php, go check your theme file, find this script
JavaScript:
function parseJSAtOnload() {var links = ["https://s0.wp.com/…ontent/js/devicepx-jetpack.js?ver=201831", "https://secure.gravatar.com/js/gprofiles.js?ver=2018Julaa","https://platform.linkedin.com/in.js?ver=4.9.7", "https://platform.twitter.com/widgets.js?ver=4.9.7"],headElement = document.getElementsByTagName("head")[0],linkElement, i;for (i = 0; i < links.length; i++) {linkElement = document.createElement("script");linkElement.src = links[i];headElement.appendChild(linkElement);}}if (window.addEventListener)
window.addEventListener("load", parseJSAtOnload, false);else if (window.attachEvent)
window.attachEvent("onload", parseJSAtOnload);else window.onload = parseJSAtOnload;
 
you need to remove this script from footer.php or function.php, go check your theme file, find this script
JavaScript:
function parseJSAtOnload() {var links = ["https://s0.wp.com/…ontent/js/devicepx-jetpack.js?ver=201831", "https://secure.gravatar.com/js/gprofiles.js?ver=2018Julaa","https://platform.linkedin.com/in.js?ver=4.9.7", "https://platform.twitter.com/widgets.js?ver=4.9.7"],headElement = document.getElementsByTagName("head")[0],linkElement, i;for (i = 0; i < links.length; i++) {linkElement = document.createElement("script");linkElement.src = links[i];headElement.appendChild(linkElement);}}if (window.addEventListener)
window.addEventListener("load", parseJSAtOnload, false);else if (window.attachEvent)
window.attachEvent("onload", parseJSAtOnload);else window.onload = parseJSAtOnload;
Yeah, that's what I already wrote, find the function "parseJSAtOnload". By the way, it doesn't seem to be in the files of the theme he uses - JNews (at least, when the OP has gotten it from Babiato).
So what exactly do you @videva contribute here?
 
Yeah, that's what I already wrote, find the function "parseJSAtOnload". By the way, it doesn't seem to be in the files of the theme he uses - JNews (at least, when the OP has gotten it from Babiato).
So what exactly do you @videva contribute here?


@sabs_rocks then just put this code below into footer.php if you cant find that script
put it after <? php wp_footer (); ?> and above the </body> tag

JavaScript:
function removeOnload(func)
{
    if(window.addEventListener)
        window.removeEventListener('load', func, false);
    else if(window.attachEvent)
        window.detachEvent('onload', func);
}

window.onload = removeOnload(parseJSAtOnload);
example :
HTML:
<?php wp_footer(); ?>
   
<!-- PUT CODE HERE -->
   
   
</body>
</html>
it will stop the parseJSAtOnload function.
 
Last edited:
  • Like
Reactions: sabs_rocks
I honestly think it's much better to get to the origin of the problem and remove that.
if he put code that i have given , the results will be same if he remove function parseJSAtOnload
directly from a file.
function parseJSAtOnload will not run anymore
 
Last edited:
  • Like
Reactions: sabs_rocks
@frizzel @videva Thanks for your inputs.

First, I removed cloudflare completely from the website. purged the cache, still the issue was present

Then, as @videva said introduced the given piece of code in footer.php theme file present in : Appearance -> Theme Editor -> Theme -> footer.php . But still the code is present in the site when loaded and the issue too.


I am cannot find the parseJSAtOnload function in footer,function or header php files when checking in WP dashboard.

can you advise what other ways we can search the php files in depth so that i can find the function and then insert the code there ?

Any other suggestions to fix this ?

Appreciate your support very much guys !
 
Hello Friend! From what I can see, you placed the code incorrectly. Place it before </body>
 

Attachments

  • Снимок экрана 2020-09-17 в 20.46.48.png
    Снимок экрана 2020-09-17 в 20.46.48.png
    93.7 KB · Views: 6
Another extreme option. Activate the default template. Remove the one that is installed now, reinstall it and activate it. Make a backup.
 
AdBlock Detected

We get it, advertisements are annoying!

However in order to keep our huge array of resources free of charge we need to generate income from ads so to use the site you will need to turn off your adblocker.

If you'd like to have an ad free experience you can become a Babiato Lover by donating as little as $5 per month. Click on the Donate menu tab for more info.

I've Disabled AdBlock