Jump to content

Strange code in <head>. Prestashop 1.6.0.6


Recommended Posts

Hi all,

 

Hope someone can help here. We have some strange code loading in our websites <head> area (directly after the <head> tag in admin and can be seen just after the <head><meta> tags on frontend). Unfortunately it's causing problems with our 'Store Commander' module.

 

Site link: http://www.mijnbedels.com/

 

We would like some help in finding out what the code below is and where it might be coming from. Any ideas?

 

All help greatly appreciated!

window.NREUM||(NREUM={}),__nr_require=function(t,n,e){function r(e){if(!n[e]){var o=n[e]={exports:{[spam-filter];t[e][0].call(o.exports,function(n){var o=t[e][1][n];return r(o?o:n)},o,o.exports)}return n[e].exports}if("function"==typeof __nr_require)return __nr_require;for(var o=0;o<e.length;o++)r(e[o]);return r}({D5DuLP:[function(t,n){function e(t,n){var e=r[t];return e?e.apply(this,n):(o[t]||(o[t]=[]),void o[t].push(n))}var r={},o={};n.exports=e,e.queues=o,e.handlers=r},{}],handle:[function(t,n){n.exports=t("D5DuLP")},{}],G9z0Bl:[function(t,n){function e(){var t=l.info=NREUM.info;if(t&&t.agent&&t.licenseKey&&t.applicationID){l.proto="https"===f.split(":")[0]||t.sslForHttp?"https://":"http://",i("mark",["onload",a()]);var n=p.createElement("script");n.src=l.proto+t.agent,p.body.appendChild(n)[spam-filter]function r(){"complete"===p.readyState&&o()}function o(){i("mark",["domContent",a()])}function a(){return(new Date).getTime()}var i=t("handle"),u=window,p=u.document,s="addEventListener",c="attachEvent",f=(""+location).split("?")[0],l=n.exports={offset:a(),origin:f,features:[]};p[s]?(p[s]("DOMContentLoaded",o,!1),u[s]("load",e,!1)):(p[c]("onreadystatechange",r),u[c]("onload",e)),i("mark",["firstbyte",a()])},{handle:"D5DuLP"}],loader:[function(t,n){n.exports=t("G9z0Bl")},{}]},{},["G9z0Bl"]);
Edited by xclamation (see edit history)
Link to comment
Share on other sites

Just a further update. I've now established that the code in my example is coming from 'New Relic' and I have also found that some other code for New Relic is just before the closing </body> tag on our site.

 

I now just need to find out where/how the New Relic code has been added and remove it for testing. Any ideas? I've tried 'footer.tpl' and 'global.tpl' to no avail...

Edited by xclamation (see edit history)
Link to comment
Share on other sites

  • 6 months later...

Hello everyone,

 

I have just get the same problem. This isn't hard code in any .tpl file or php file. It is installed from server. My server is Ubuntu so I have removed by this command: 

sudo /usr/bin/newrelic-install purge

For more information, you can read here: https://docs.newrelic.com/docs/apm/new-relic-apm/installation-configuration/uninstalling-agent 

Good luck!

P/S: This topic should be mark as "Solved!"

Link to comment
Share on other sites

×
×
  • Create New...